Forum Moderators: coopster
$connection = mysql_connect ("localhost", "root", "")
or die("Could not connect to server");
mysql_select_db("house", $connection) // profile is the name of your DB
or die("Could not select database");
$name = addslashes ($_POST['name']);
$address = addslashes($_POST['address']);
$email = addslashes($_POST['email']);
$telephone = addslashes($_POST['telephone']);
$comments = addslashes($_POST['comments']);
$deliverytime = $_POST['deliverytime'];
$bread = $_POST['bread'];
$query = "INSERT INTO house (name, address, email, telephone, comments, deliverytime, bread)
VALUES ( '$name', '$address', '$email', '$telephone', '$comments', '$deliverytime', '$bread',)";
$result = mysql_query($query) or die ("Could Not Insert Record Into Database.");
mysql_close($connection);
?>
i get the comment, could not insert record into database
this has quotes around values
( '$name', '$address', '$email', '$telephone', '$comments', '$deliverytime', '$bread',)
check the manual that corresponds to your MySQL server version for the right syntax to use near 'Johne, 53 Stewart Street, Street@yahoo, 23432, asdfsdfff, , ,)' at line 2
the above does not and should cause an error
also in the top snippet the trailing comma should be removed
( '$name', '$address', '$email', '$telephone', '$comments', '$deliverytime', '$bread',)
to ...
( '$name', '$address', '$email', '$telephone', '$comments', '$deliverytime', '$bread')
If this makes no difference then please let me know
Del