Gossamer Forum
Home : General : Perl Programming :

Re: Is this possible, Enter multi. records on 1 submit

Quote Reply
Re: Is this possible, Enter multi. records on 1 submit In reply to
Hello Paul,

I'll try and explain without getting too long. This is on a script I am writing. This is the last bit I can't figure out.

A visitor comes and want to add 6 entries. Rather than having the user add the entry on 6 different forms, I was wanting to have a multiple entry form where the user can add up to 10 entries at one time. My fields are ID, username, email, request, and request_type.

I have written the form entry once and then just copied the same form over 9 more times and encased it with one form tag at the beginning and one </form> and one submit button at the end.

I would like for the script to read each line as one entry, print it to the file and then go to the next line and do the same until it reaches a blank entry or all ten entries and then quit. Or possibly read all of the entries and then print them all at one time, one per line.

Since each entry within the forms have the same field names, it just fills in all of the remaining blanks entry lines and prints all of the information on one line as if it was one entry.

I was thinking I could accomplish this by using some sort of statement after the request_type field to begin a new line in the record file and an if (!$form{'username'}) statement to ignore the rest of the empty fields. The ID is a random number assigned to the entry.

Am I even on the right track? Thanks for the input.

Jimmy Crow
http://www.homewithgod.com/
Subject Author Views Date
Thread Is this possible, Enter multi. records on 1 submit jcrow 3316 Jul 31, 2001, 9:47 AM
Thread Re: Is this possible, Enter multi. records on 1 submit
Paul 3162 Jul 31, 2001, 10:27 AM
Thread Re: Is this possible, Enter multi. records on 1 submit
jcrow 3147 Jul 31, 2001, 10:52 AM
Thread Re: Is this possible, Enter multi. records on 1 submit
sponge 3118 Jul 31, 2001, 9:10 PM
Thread Re: Is this possible, Enter multi. records on 1 submit
jcrow 3136 Aug 2, 2001, 4:41 AM
Thread Re: Is this possible, Enter multi. records on 1 submit
jcrow 3123 Aug 2, 2001, 6:35 AM
Post Re: Is this possible, Enter multi. records on 1 submit
sponge 3082 Aug 2, 2001, 3:39 PM