in reply to Re: Perl DBI, multiple values question
in thread Perl DBI, multiple values question
The form has 5 input fields for "subject" (forget "member"):
input type="text" name="subject" value="" ... repeated 5 times
The user can enter data in 1-5 five of these.
This gets passed on to the DBI script.
The script should produce one INSERT INTO statement for each value entered, such as:
"INSERT INTO subjects VALUES ($FORM{'subject'})";
(the table "subjects" consists simply of auto-incremented id and subject).
An easy way would of course be to name the input fields subject1, subject2 etc., but it would be better to solve it with some kind of loop.
Again, many thanks for your help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Perl DBI, multiple values question
by UnderMine (Friar) on Nov 22, 2002 at 15:39 UTC | |
by rdfield (Priest) on Nov 22, 2002 at 16:14 UTC |