RE: [PHP-DB] Input to DB from form
| From: | Ryan Marrs | Date: | Thu, 03 Jan 2002 18:57:59 +0000 |
| Subject: | RE: [PHP-DB] Input to DB from form | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-15347@lists.php.net to get a copy of this message | ||
Are you even calling the mysql_query() function?
Should look something like this:
Mysql_connect("localhost","cloft","spring");
mysql_select_db("countryloft");
$sql = "INSERT INTO catalogreq
(BFNAME,BLNAME,ADD1,ADD2,BCITY,BZIPA,BSTATE,BCTRY,BTELO,DATE) VALUES
('$BFNAME','$BLNAME','$BADD1','$BADD2','$BCITY','$BZIPA','$BSTATE','$BCTRY',
'$BTELO','$TODAY')";
Mysql_query($sql);
--Ryan
-----Original Message-----
From: James Kupernik [mailto:kupernik@bcn.net]
Sent: Thursday, January 03, 2002 01:52 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Input to DB from form
I'm trying to input that data entered into a form into a table in my DB.
Here is the code I have.
$db = mysql_connect("localhost","cloft","spring");
mysql_select_db("countryloft",$db);
$sql = "INSERT INTO catalogreq
(BFNAME,BLNAME,ADD1,ADD2,BCITY,BZIPA,BSTATE,BCTRY,BTELO,DATE) VALUES
('$BFNAME','$BLNAME','$BADD1','$BADD2','$BCITY','$BZIPA','$BSTATE','$BCTRY',
'$BTELO','$TODAY')";
This is embedded in an HTML document and loads the entire document, but
doesn't add the information to the table. Any help would be wonderful!
James
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net