I run this script and i get a parse error? i cant seem to see why
code:
<?php
if (isset($addnews));
?>
<table align="center" cellspacing="1" cellpadding="0" width="415" border="1" bordercolor="#000000">
<tr>
<td class="td" background="images/v1.gif">
<center><b>Post News</b></center>
</td>
</tr>
<tr>
<td class="td">
<form action="<?php echo($PHP_SELF); ?>" method=post>
<P align="center"><strong>Write News Here</strong><BR>
<textarea name="news" class="form" rows="10" cols="40" wrap></textarea>
<BR>
<input type="submit" name="submit" Vvalue="SUBMIT">
</p>
</form>
<?php
else {
// Connect to the database server
$dbcnx = @mysql_connect("localhost", "root", "pass"); if (!$dbcnx) { echo( "<P>Unable to connect to the " . "database server at this time.</P>" ); exit(); }
// Select the database
if (! @mysql_select_db("db") ) { echo( "<P>Unable to locate the news" . "database at this time.</P>" ); exit(); }
// If a joke has been submitted, add it to the database.
if ("SUBMIT" == $submitnews) { $sql = "INSERT INTO news SET " . "title='$title', " . "date=CURDATE()" . "user='$user'" . "news='$news'"; exit(); }
}
?>
</td>
</tr>
</table>