I need some help with a syntax error that I'm getting. I altered my database to change one field and add one. I then altered the form to reflect these changes, and altered the php code as well.
Here's the altered code:
$FName=$POST['FName'];
$LName=$POST['LName'];
$Color=$POST['Color'];
$Group=$POST['Group'];
$UName=$POST['UName'];
$PWord=$POST['PWord'];
$EMail=$_POST['EMail'];
mysql_connect($host, $user, $pass) or die('Connection died!');
mysql_select_db($db) or die('Selection died!');
$add_all="INSERT INTO $table (FName, LName, Color, Group, UName, PWord, EMail) values ('$FName','$LName','$Color','$Group','$UName','$PWord','$EMail');";
mysql_query($add_all) or die(mysql_error());
and here's the 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 'Group, UName, PWord, EMail) values ('xxxxx','xxxxxx','b','2','h
I did add the proper variables, etc., and everything looks OK - I'm probably missing something glaringly obvious...