I get this error
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘Condition, Othercomments) VALUES (”,”,”,”,”)’ at line 1
When I submit a form that activates this code:
[code]<?php
$con = mysql_connect(“localhost”,”usedgam”,”******”);
if (!$con)
{
die(‘Could not connect: ‘ . mysql_error());
}
mysql_select_db(“usedgam_Gamelist”, $con);
$sql=”INSERT INTO Information (Name, Game, Description, Condition, Othercomments)
VALUES
(‘$_POST[name]’,’$_POST[game]’,’$_POST[description]’,’$_POST[condition]’,’$_POST[othercomments]’)”;
if (!mysql_query($sql, $con))
{
die(‘Error: ‘ . mysql_error());
}
echo “1 record added”;
mysql_close($con)
?>
Also, on an unrelated note, I was wondering if I could get help on a code that automatically puts everything on that database to a web page.