Im doing a form that insert the values of the formfields entered into the database.. the page works just fine with no errors at all, however, it doesnt insert anything.. and im sure all the field properties are correct.. varchar for all of them and id for id with auto increment..
<?
while (list($name, $value) = each($HTTP_POST_VARS)) {
echo "$name = $value<br>\n";
} ;
if ($submit){
$db=mysql_connect ("localhost", "uname", "pword") or die ('I cannot connect to the database.');
mysql_select_db ("saydnaya_requestatour");
$tourname = $_POST["tourname"];
$numberofpeople = $_POST["numberofpeople"];
$language = $_POST["language"] ;
$transport = $_POST["transport"] ;
$date = $_POST["date"] ;
$budget = $_POST["budget"] ;
$hotel = $_POST["hotel"] ;
$nationality = $_POST["nationality"] ;
$email = $_POST["email"] ;
$name = $_POST["name"] ;
$sql = "INSERT INTO 'tourrequests' (tourname, numberofpeople, language, transport, date, budget, hotel, nationality, email, name) VALUES ('$tourname', '$numberofpeople', '$language', '$transport', '$date', '$budget', '$hotel', '$nationality', '$email', '$name')";
$result = mysql_query($sql);
echo "Thank you for request a tour, you will be emailed with the price quotation shortly" ;
} else {
?>
page comes then close the else..
http://12.129.206.122/~saydnaya/requesttour.php
try filling it in.. it will work and you will end up in the thank you page, with what u entered.. however, the data is not inserted to the db for some reason.. this is driving me mad, anyone has any ideas?
Thanks
