I get this error:
Quote
Parse error: syntax error, unexpected T_ELSEIF in /home/****/****/****/****/****/index.php on line 384
here's my function:
[HIGHLIGHT="PHP"]function file_notes(){
$act = $_GET['act'];
$do = $_GET['do'];
if((isset($act) && $act == "notes") && isset($do) && $do == "notes"){
$file = "notes.txt";
if(!unlink($file)){
echo "Can not delete $file";
}else{
$content = $_REQUEST['new_notes_content'];
if(!file_exists($file)){
$open = fopen($file, "a");
fwrite($open, $content);
fclose($open);
echo "<center><b>Note book</b><br>Notebook updated!</center><br>";
echo notes_form();
}elseif(file_exists($file)){
$open = fopen($file, "a");
fwrite($open, $content);
fclose($open);
echo "<center><b>Note book</b><br>Notebook updated!</center><br>";
echo notes_form();
}
}
}
}elseif(isset($act) && $act == "notes" && !isset($do)){
$file = "notes.txt";
if(!file_exists($file)){
$open = fopen($file, "a");
fwrite($open, "");
fclose($open);
}
$txt = file_get_contents($file);
echo "<center><b>Notebook</b></center><br>
<form action='?act=notes&do=notes' method='post'>
<table width='500' border='0' align='center'>
<tr>
<td><textarea cols='100' rows='15' name='new_notes_content'>$txt</textarea><br><input type='submit' value='Update'></form></td>
</tr>
</table>";
}
}[/HIGHLIGHT]
i really can't find what's wrong with my elseif thingy
[HIGHLIGHT="PHP"]}elseif(isset($act) && $act == "notes" && !isset($do)){[/HIGHLIGHT]
this line is this 384... :/ but i can't find any problems
maybe you can help me..


Sign In
Create Account

Guest_Jaan_*
Back to top









