I have a form that calls a php file that has this segment in it. I do not get an error at all. But my data is not posted to the DB. I can, however, enter data directly into the DB from the PHP administrator tool. I am using this from "hypermart.net" and have no control over how it was set up. I don't know if the problem is my form or what. I am pretty new at PHP and am not sure how to test to see if my variables are being correctly passed from my other form. I have several books but just haven't had time to read them completely - I have just skimmed pertinent chapters and haven't found an answer to my question yet. This project is a survey (very simple) and after I get it working, I will have to really spend learning it. Thanks for any help.
(fyi - I removed the blank lines and took out my real localhost, uname and password)
@ $db = mysql_connect("localhost", "uname", "password");
echo "Error: Can not get to the database: Try again later.";
$sql = "INSERT INTO tblEval (Class, Email, Engage, Distance, Affirm, Confuse, Surprise) VALUES ('$Class','$Email','$Engage','$Distance','$Affirm','$Confuse','$Surprise','$Comment')";
$result = mysql_db_query($sql);
echo mysql_affected_rows()."Thank you! Information entered.\n";