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
>cop
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...
>
>
> $user = "xyz";
> $pass = "123";
>
>
> //Connect to Database xyz
> $db = mysql_connect("localhost", $user, $pass
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 do
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
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.
Ther
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
What could I possibly be doing wrong here. The information just will not
insert into my database.
ARGH!
Please help if you can...
--
Regards,
YoBro
-
DO NOT REPLY TO THIS VIA EMAIL
PLEASE USE THE NEWSGROUP
All emails sent to this ad
7 matches
Mail list logo