Re: [PHP] I need an expert to tell me what I am doing wrong

2001-03-25 Thread David Robley
On Sat, 24 Mar 2001 11:07, YoBro wrote: What could I possibly be doing wrong here. The information just will not insert into my database. ARGH! Please help if you can... ?php $user = "xyz"; $pass = "123"; //Connect to Database xyz $db = mysql_connect("localhost", $user, $pass)OR

Re: [PHP] I need an expert to tell me what I am doing wrong

2001-03-25 Thread trogers
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

RE: [PHP] I need an expert to tell me what I am doing wrong

2001-03-23 Thread John Almberg
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

Re: [PHP] I need an expert to tell me what I am doing wrong

2001-03-23 Thread YoBro
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.

RE: [PHP] I need an expert to tell me what I am doing wrong

2001-03-23 Thread calvin_phung
YoBro, I think you need to wrap $product, $name and $email in quotes when sending the statement to MYSQL. Calvin -Original Message- From: YoBro [mailto:[EMAIL PROTECTED]] Sent: Friday, March 23, 2001 4:38 PM To: [EMAIL PROTECTED] Subject: [PHP] I need an expert to tell me what I am

Re: [PHP] I need an expert to tell me what I am doing wrong

2001-03-23 Thread Michael Hall
Something else to investigate could be whether you've passed the db name to the script. If the the name of the db is different to $user, you'll need to do something like $dbname = "whatever"; mysql_select_db("$dbname",$db); Mick On Sat, 24 Mar 2001, YoBro wrote: What could I possibly be