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/
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/