Code: Select all
<?php
<?PHP
if (isset($_POST['submit'])) {
$con = mysql_connect("localhost","pinehead","") or die(mysql_error());
$db = mysql_select_db("lkcforum",$con) or die(mysql_error());
$sql = "INSERT INTO topics (tid,topic,uname,body) VALUES ('$tid','$topic','$user','$body');
mysql_query($sql,$con) or die(mysql_error());
mysql_close();
}
$output = "
<table id=table2>
<form method=post action=post.php>
<tr>
<td width=20%>Subject</td><td width=80%><input type=text name=subject</td>
</tr>
<tr>
<td width=20%>Message</td><td width=80%><input type=text name=body</td>
</tr>
<tr>
<td align=center><input type=submit name=submit value=Submit> <input type=reset
name=Reset></td>
</tr>
</table>
<input type=hidden value=$tid>
";
echo $output;
}
?>
?>Parse error: parse error, unexpected T_STRING in /home/pinehead/www/forums/post.php on line 14
that is my error. Thank you for your help.