note 42512 added to language.variables

From: Date: Wed, 19 May 2004 14:16:10 +0000
Subject: note 42512 added to language.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-69826@lists.php.net to get a copy of this message
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"; ?> ---- Manual Page -- http://www.php.net/manual/en/language.variables.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42512 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42512&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42512&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69826) next »