I have successfully just created a script, I know it connects to the db and adds a record for the comments field and puts the value in. However it will not add the name and email address, I have taken all error checking because it won't seem to get past the !$var to check if the forms are empty as well. what can I do. Here is my main block of code.
$user = addslashes($user);
$email = addslashes($email);
$comments = addslashes($comments);
$dbh = mysql_connect("localhost", "admin", "password");
mysql_select_db("admin_mj", $dbh);
$addfeedback = "INSERT INTO 'feedback' (user, email, spam, comments)
VALUES ('".$user."', '".$email."', '".$spam."', '".$comments."')";
$result = mysql_query($addfeedback);
?>
Using 4.1.21 and the latest mysql.
How can I tell if the variables are not being sent from the submitted form which is as follows
2007-03-12
07:19:03
·
4 answers
·
asked by
william_mac_13
2
in
Computers & Internet
➔ Programming & Design
2007-03-12
07:19:46 ·
update #1