$query = "INSERT INTO contacts VALUES ('','$first','$last','$phone','$mobile','$fax','$e mail','$web')";
you have not used the $_POST function to get the values. You will need to define them using
$first = $_POST['first'];
above the query (for each of them). You should also run some validation checks after it is working to ensure they are not empty etc.
if(empty($first)) {
echo "you did not fill in the first field";
exit;
}
Thats the kind of principle you will need to use.
|