Parse error: parse error, unexpected T_VARIABLE in /home/vhosts/www.rayquazalair.net/postingupdate.php on line 35"
What's wrong and how do I fix it? Here's the code:
Code: Select all
<?php
$isusernamevalid = $_POST['isusernamevalid'];
$username = $_POST['username'];
$date = $_POST['date'];
$content = $_POST['content'];
$avatarpath = $_POST['avatarpath'];
$title = $_POST['title'];
$table = <<<EOT
<br>
<br>
<br>
<br>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%">
<tr>
<td width="100%" height="12" background="newstitlebg.png">
<font size="1" face="Tahoma" color="#FFFFFF">$title - Posted By $username on $date </font>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#004400"><p align="justify">
<img src="$avatarpath" align="left">$content</p>
<p align="center">-$username-</p>
</td>
</tr>
</table>
EOT;
$filename = "updates.txt"
$handle = fopen($filename, "wb");
$numbytes = fwrite($handle, $table);
if ($isusernamevalid == valid) {
fclose($handle);
print "Update was posted successfully. $numbytes bytes posted.\n";
} else {
print "Update was not posted successfully.\n";
}
print "Click <a href=\"index2.php\">Here</a> to go to the main page";
?>