[PHP-DB] What's wrong with this code?

2002-09-01 Thread Shoulder to Shoulder Farm
Hi all, I'm running PHP4. What's wrong with this code: ? $db = mysql_connect(localhost, Taj, wyethia); mysql_select_db(s2s,$db); mysql_query(INSERT INTO prod VALUES ( 'Name', 'ShortDesc', 'LongDesc', 'PriceOZ', 'PriceLB', 'URLOZ', 'URLLB', 'IMG') VALUES ('$_POST[Name]', '$_POST[ShortDesc]',

[PHP-DB] What's wrong with this code?

2002-09-01 Thread Shoulder to Shoulder Farm
Hi all, I'm running PHP4. What's wrong with this code: ? $db = mysql_connect(localhost, Taj, passwordhere); mysql_select_db(s2s,$db); mysql_query(INSERT INTO prod VALUES ( 'Name', 'ShortDesc', 'LongDesc', 'PriceOZ', 'PriceLB', 'URLOZ', 'URLLB', 'IMG') VALUES ('$_POST[Name]',

RE: [PHP-DB] What's wrong with this code?

2002-09-01 Thread Beau Lebens
I'd use var inclusions like this; VALUES (' . $_POST['Name'] . ', that might help you // -Original Message- // From: Shoulder to Shoulder Farm [mailto:[EMAIL PROTECTED]] // Sent: Monday, 2 September 2002 11:42 AM // To: PHP Database List // Subject: [PHP-DB] What's wrong

[PHP-DB] What's wrong with this code?

2001-03-26 Thread Emir Musabasic
Hi, I really need help, I wrote a function so that I can call for db user/password in an include file. It looks like this: // Connect to the database function db_connect(){ global $MYSQL_USERNAME, $MYSQL_PASSWORD, $DB, $HOST; $db =

RE: [PHP-DB] What's wrong with this code?

2001-03-26 Thread Brunner, Daniel
Hello... Try mysql_pconnect instead Dan -- From: Emir Musabasic Sent: Monday, March 26, 2001 9:34 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] What's wrong with this code? Hi, I really need help, I wrote a function so that I can call for db user

Re: [PHP-DB] What's wrong with this code?

2001-03-26 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Emir Musabasic) wrote: I have user/password/host variables inside a config file but for some reason when I include this into a php page when I test it, I get: Fatal error: Cannot redeclare db_connect() in