When I try and execute the following code, I get a parse error on like 71 (The last line, after the closing PHP tag). I dont understand whats is wrong with it.
Code:
<?php
error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
$title= $_POST['title'];
$music= $_POST['music'];
$mood= $_POST['mood'];
$message= $_POST['message'];
$date = date("F j, g:i A ");
//checks to see if the fields are filled
if (empty($title))
{ // ;)
$error .= "Title not filled...<br>";
}
if (empty($music)) {
$music = "Not listening to music";
{
if (empty($mood)) {
$mood = "No currently feeling a mood";
}
if (empty($mesage)) {
$error .= "Message not filled...<br>";
}
//checks to see if there are any error messages
if($error) {
print $error;
print '<br><br><a href="addpost.php">Retry Blogging<br>';
exit;
}
//continues checking
if($error=="") {
$info = "<p class=\"forTexts\"><strong>$title</strong><font size=1>$time</font><br><br><br><b>Music:</b>$music<br><b>Mood: </b>$mood<br><br>$message</p>";
//opens file
$file= fopen("blog.txt", "a");
flock($file, LOCK_EX);
//checks to see if proccess is available
if(!$file) {
print "<p>Cant be processed now, try again later...</p>";
exit;
}
//writes to file and closes file
fwrite($file, $info);
flock($file, LOCK_UN);
fclose($file);
print '<a href=\"../index.php\">Entry Written</a>';
}
?>
Thanks