I've getting an error: Parse error: syntax error, unexpected $end on line 64
Can someone see were I type it wrong.
Thanks..
[code=php]
<?php
require("databa se.inc.php");
{connectDatabas e();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Væ lg lyd til <?=$_POST['title']?></title>
<link href="style.css " rel="stylesheet " type="text/css" />
</head>
<body>
<? if(file_exists( "text/".$_POST['title'].".txt")) {
?>
<h1>Væl g lyd</h1>
<h3 style="color:#C C3333">Pas på! Der findes allerede et diktat med denne titel.<br />
Hvis du er ved at lave et nyt diktat, burde du gå <a href="javascrip t:history.back( )">tilbage</a> og vælge en anden titel.
Gør du ikke det, bliver diktatet med titelen "<?=$_P OST['title']?>" erstattet med dette diktat her!</h3>
<?php
}
?>
<form enctype="multip art/form-data" action="save_di ct.php" method="post">
<input type="hidden" name="MAX_FILE_ SIZE" value="500000" />
<table border="0">
<?php
$result=mysql_q uery("SELECT word FROM repository;");
while($entry=my sql_fetch_array ($result)) {
if(! $result)
exit(mysql_erro r());
}
$word_start=0;
$word_stop=0;
$open=false;
$words=array();
$content=$_POST['content'];
for($i=0;$i<str len($content);$ i++) {
if(substr($cont ent,$i,1)=="<" && !$open) {
$word_start=$i+ 1;
$open=true;
}
elseif(substr($ content,$i,1)== ">" && $open) {
$word_stop=$i;
$word=substr($c ontent,$word_st art,$word_stop-$word_start);
if(!in_array($w ord,$repository )) {
$words[]=$word;
?>
<tr>
<td><?=$word? ></td>
<td><input type="file" name="<?=$word? >" /></td>
</tr>
<?
}
$open=false;
}
}
?>
</table>
<input type="hidden" name="words" value="<? echo implode(";",$wo rds); ?>" />
<input type="hidden" name="content" value="<?=$_POS T['content']?>" />
<input type="hidden" name="title" value="<?=$_POS T['title']?>" />
<input type="submit" value="Upload & gem" />
</form>
</body>
</html>
[/CODE]
Can someone see were I type it wrong.
Thanks..
[code=php]
<?php
require("databa se.inc.php");
{connectDatabas e();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Væ lg lyd til <?=$_POST['title']?></title>
<link href="style.css " rel="stylesheet " type="text/css" />
</head>
<body>
<? if(file_exists( "text/".$_POST['title'].".txt")) {
?>
<h1>Væl g lyd</h1>
<h3 style="color:#C C3333">Pas på! Der findes allerede et diktat med denne titel.<br />
Hvis du er ved at lave et nyt diktat, burde du gå <a href="javascrip t:history.back( )">tilbage</a> og vælge en anden titel.
Gør du ikke det, bliver diktatet med titelen "<?=$_P OST['title']?>" erstattet med dette diktat her!</h3>
<?php
}
?>
<form enctype="multip art/form-data" action="save_di ct.php" method="post">
<input type="hidden" name="MAX_FILE_ SIZE" value="500000" />
<table border="0">
<?php
$result=mysql_q uery("SELECT word FROM repository;");
while($entry=my sql_fetch_array ($result)) {
if(! $result)
exit(mysql_erro r());
}
$word_start=0;
$word_stop=0;
$open=false;
$words=array();
$content=$_POST['content'];
for($i=0;$i<str len($content);$ i++) {
if(substr($cont ent,$i,1)=="<" && !$open) {
$word_start=$i+ 1;
$open=true;
}
elseif(substr($ content,$i,1)== ">" && $open) {
$word_stop=$i;
$word=substr($c ontent,$word_st art,$word_stop-$word_start);
if(!in_array($w ord,$repository )) {
$words[]=$word;
?>
<tr>
<td><?=$word? ></td>
<td><input type="file" name="<?=$word? >" /></td>
</tr>
<?
}
$open=false;
}
}
?>
</table>
<input type="hidden" name="words" value="<? echo implode(";",$wo rds); ?>" />
<input type="hidden" name="content" value="<?=$_POS T['content']?>" />
<input type="hidden" name="title" value="<?=$_POS T['title']?>" />
<input type="submit" value="Upload & gem" />
</form>
</body>
</html>
[/CODE]
Comment