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 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 DIE("Unable to connect to
> database");
>
> mysql_select_db("xyz",$db) OR DIE("Unable to connect to database");
>
> $sql = ("INSERT INTO orders VALUES
> 'product,name,email'($product,$name,$email)");
> $result = mysql_query($sql);
> echo "Order for the $product has been sent";
>
>
> ?>
>
> --
> Regards,
>
>
> YoBro
> -------------------------------------------------------------
> DO NOT REPLY TO THIS VIA EMAIL
> PLEASE USE THE NEWSGROUP
> All emails sent to this address are automatically deleted.
> This is to avoid SPAM!
> -------------------------------------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]