Q : HELP HTML forms parsed into an array for PHP
| From: | Ow Mun Heng | Date: | Tue, 17 Jun 2003 02:27:46 +0000 |
| Subject: | Q : HELP HTML forms parsed into an array for PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-151771@lists.php.net to get a copy of this message | ||
Hi all,
Really hope someone can help me out.
What I would like to do is to input multiple isbn numbers into a form, get
PHP to parse it into an array so that I can build the SQL query for multiple
insert. Currently I'm able to perform single inputs, one at a time, which is
time consuming.
I want to have a form<textarea name=isbn row=10 col=13> set up to get user
input (multiline, each line separated by a carriage return - actually it's
barcode is scanned in)
eg : ISBN - 1-111-22222-1
1-111-22222-2
1-111-22222-3
I would like to parse this data into PHP and get PHP to use a foreach loop
(or a for loop) so that I can build up the $query to form ('isbn1')
('isbn2') ('isbn3').
I'm trying to insert into mySQL a multiple value insert sort of like
$query = insert into table values
('isbn1')
('isbn2')
('isbn3');
Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168