note 42512 rejected from language.variables by betz

From: Date: Wed, 19 May 2004 15:27:13 +0000
Subject: note 42512 rejected from language.variables by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-69829@lists.php.net to get a copy of this message
Note Submitter: chester@cheesy.ca ---- I haave this form, and I typed this PHP in for inserting into the MySQL database. When I run it, I get an error msg saying there was an unexpected T_VARIABLE. I've checked all the form inputs and they are correct. Help, anyone? Here is the PHP section of the source code: <?php $name = $_POST[Name]; $email = $_POST[Email]; $age = $_POST[Age]; $education = $_POST[Education]; $occupation = $_POST[Occupation]; $goodness = $_POST[goodness]; $type = $_POST[type]; $comment = $_POST[comment]; $thirtyplus62-answer = $_POST[thirtyplus62-answer]; $boxveri = $_POST[boxveri]; $conn = mysql_connect("******", "**username***", "*****pasword here *****"); mysql_select_db("***db name***", $conn); $sql = "insert into feedback values ('', '$name', '$email', '$age', '$education', '$occupation', '$goodness', '$type', '$comment', '$thirtyplus62-answer', '$boxveri'"; //execute! if (mysql_query($sql, $conn)) { echo "<p>Thank you, <b>$_POST[Name]</b>, for leaving a(n) <b>$_POST['type']</b>" echo "<p>Your comment was: <b><br>$_POST['comment']</b>" echo "<p>Your email was: <b>$_POST['Email']</b>" echo "<P>Your record has been added. Thank you for submitting the form. <a href=\"*****a link here*****\" target=\"mainFrame\">Back Home</a>"; } else { echo "<b>Warning: </b>MySQL or PHP error. Please contact the <a href=\"mailto:***email***?Subject=PHP /MySQL Problems\">Web Admin</a>. Thank you"; ?>

« previous php.notes (#69829) next »