Re: I need an expert to tell me what I am doing wrong
| From: | trogers | Date: | Mon, 26 Mar 2001 01:36:44 +0000 |
| Subject: | Re: I need an expert to tell me what I am doing wrong | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45551@lists.php.net to get a copy of this message | ||
Hi
what you need is:
$sql = "INSERT INTO orders (product,name,email)
: VALUES ('$product','$name','$email')";
You will also need to escape any single quotes in the variables
Tom
At 01:05 PM 24/03/01 +1200, YoBro wrote:
I have tried that, and I have been reading all sorts of info and been copying it exact, but it still doesn't work. I am not receiving any errors, but the data just doesn't appear in the database. I have the table set up and it all works fine in phpMyAdmin, but I cant get my own form to work. There is a page called order.php with a form that on submit goes to the discussed page. All field variables are correct. Any other ideas. : You don't say where the failure is, but I'm guessing its when you do the : mysql_query. Your INSERT statement looks a bit odd. : Try: : : $sql = "INSERT INTO orders (product,name,email): VALUES ($product,$name,$email)";: : John : : : : -- : PHP General Mailing List (http://www.php.net/) : To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net : For additional commands, e-mail: php-general-help@lists.php.net : To contact the list administrators, e-mail: php-list-admin@lists.php.net : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net