why is this script not working
Posted: Sat May 08, 2010 12:20 pm
Hi, i have another html form that inserts data fine to the same server. Can you see anything wrong with this script. i get this error msg
"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 'when, venue, address, postCode, description,image, image1, image2, image3, image' at line 1"
"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 'when, venue, address, postCode, description,image, image1, image2, image3, image' at line 1"
Code: Select all
<?php
include("connect.php");
if (isset($_POST['submit'])){
}
mysql_query ("INSERT INTO parties (type, night, when, venue, address, postCode, description,image, image1, image2, image3, image4, contactEmail, number, email, password, conpass)
VALUES
('$_POST[type]','$_POST[night]','$_POST[when]', '$_POST[venue]','$_POST[address]', '$_POST[postCode]', '$_POST[description]', '$_POST[image]', '$_POST[image1]',
'$_POST[image2]', '$_POST[image3]', '$_POST[image4]','$_POST[contactEmail]','$_POST[number]','$_POST[email]','$_POST[password]','$_POST[confirmPassword]' )")
or die(mysql_error());
echo "Data inserted!";
?>