Forum Moderators: coopster
This is from the php file that a form calls via POST. The relevant code is this:
mysql_query("INSERT INTO venues
(name, type, image_url, address1, address2, state, city, region, neighborhood, zip, description) VALUES(".$_POST['name'].", ".$_POST['type'].", ".$_POST['image_url'].", ".$_POST['address1'].", ".$_POST['address2'].", ".$_POST['state'].", ".$_POST['city'].", ".$_POST['region'].", ".$_POST['neighborhood'].", ".$_POST['zip'].", ".$_POST['description'].")") or die(mysql_error());
...and I get an error saying the syntax near the form entries for region, neighborhood, zip, and description is wrong. IE, if I write "Manhattan" for the region, "Harlem" for the neighborhood, "10000" for the zip and "Description" for the description, the error says:
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 ' , manhattan, harlem, 10000, Description)' at line 2 I'm guessing it's something at the end of the query, but I'm not familiar enough with MySQL to figure it out. Any ideas?
Thanks.