hai guyz...1st of all i would lik 2 thank to those who teach me on how to do an announcement...now i got new problem...im doin online food delivering system within campus...so user can view the food and if the user click buy, they can view the name, price n description of the food. So the user need to key in their email,apartment name , room number and quantity. so it wil store into database and the admin can view the name, price n description of the food plus user email,apartment name , room number and quantity ...the problem now is after i key in everthing and click buy it show that the order is successfuly sent but the db is empty.I hope somebody can solve my problem....below is my script....10q...
<?php
/* fetch data from form input */
extract ($_POST);
/* connect to server */
$db = mysql_connect("localhost", "root", "") or die ("Could Not Connect to Server" . mysql_error());
/* select database */
mysql_select_db("webauth", $db) or die ("Could Not Find Database" . mysql_error());
/* fields' names in the database */
$result = "INSERT INTO buy (id,type,price,desc,email,apartment,roomno,qty)";
/* variable name as declared as above to be entered to the field */
$result .= "VALUES ('$id', '$type', '$price','$desc','$email','$apartment','$roomno','$qty')";
mysql_query($result, $db);
/* variable name as declared as above to be entered to the field */
/* fields' names in the database */
/* execute the query */
echo "successful";
echo "<br>";
echo "<a href=order.php>Home</a>";
mysql_close($db);
?>