I am getting this stupid parse error for this code
if ($action == "insert" AND $row["num_users"] == "0")
{
$query = "INSERT INTO stats (username,str,int,wis,cha,con,dex) VALUES ('$username','$str','$int','$wis','$cha','$con','$dex')";
mysql_query($query) or die (mysql_error());
echo "You know have your stats, good luck";
die();
}
more specifically
$query = "INSERT INTO stats (username,str,int,wis,cha,con,dex) VALUES ('$username','$str','$int','$wis','$cha','$con','$dex')";
The error I get is:
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 'int,wis,cha,con,dex) VALUES ('test','13','11','7','15','16','11
All those variables are random numbers and the table name is right.