I’m new to PHP and creating a shoutbox for my site, but I keep getting this:
Parse error: parse error, unexpected T_VARIABLE in /home/vip3r/public_html/scripts/shoutbox/submit.php on line 14
here’s my code:
<?
$db = mysql_connect("localhost","vip3r","password");
//the host, name, and password for your mysql
mysql_select_db("vip3r",$db);
if($submit)
{
$sql = "INSERT INTO shoutbox (id,name,message) VALUES_('NULL','$name', '$message')";
____$result=MYSQL_QUERY($sql);
// inserting it into the shoutbox table which we made in the mysql statements before
}
?>
<form action="<? echo $php_self ?>" method="post">
<INPUT TYPE='TEXT' value='name' NAME='name' SIZE=30 maxlength='100'><br>
<INPUT TYPE='TEXT' value='message' NAME='message' SIZE=30 maxlength='100'>
<input type="submit" name="submit" value="submit">
</form>
I googled it, and all the causes seem to be careless mistakes. I can’t find any in mine, but I’ve probably overlooked something. Any ideas?