RE: [PHP] form with multiple lines to insert

From: Date: Thu, 27 Feb 2003 17:26:43 +0000
Subject: RE: [PHP] form with multiple lines to insert
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-137432@lists.php.net to get a copy of this message
> I'm working on a form that will submit multiple lines of data to a > database. > > The form's style is that of an order form, where there are lines for each > item available, and a single submit button at the foot of the page. > > For example: > > =============== > Item Quantity > -------------------- > Apples |______| > Oranges |______| > Bananas |______| > > |SUBMIT| > > =============== > > I will admit I'm new to php programming, and I'm a bit stumped about how > to > get multiple lines from the form to INSERT into the database. You'll need to do 3 inserts, one after the other. Or, format your insert such as: INSERT INTO table (col) VALUES (val1),(val2),(val3); Which will create 3 rows. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#137432) next »