drewboy has asked for the wisdom of the Perl Monks concerning the following question:
$recipname1 $recipemail1 #row1 $recipname2 $recipemail2 #row2 $recipname3 $recipemail3 #row3 $recipname4 $recipemail4 #row4 $recipname5 $recipemail5 #row5
I also allow users to set the number of fields for them to fill up. Like if they set $recipnumber to 2 (through a select menu), only two input fields ($recipname1 & 2 and $recipemail1 & 2) appear in the page. I have also gotten it to work so that, say $recipname1 had already been inputed with "Andrew" and $recipemail1 with "andrew@andrew.com", no matter how many times I set $recipnumber to different numbers from 1-5 the data still remains where they're supposed to be. However, my problem enters when say, there are currently 5 rows available, and $recipname5 and $recipemail5 are filled with values "Joseph" and "joseph@joseph.com" respectively (all other fields empty), when I set $recipnumber to 1 for example, of course only one row will appear, however, the 5th row values dissappear accordingly with the 5th row, which I am expecting anyway. I would like it to work so that the script can detect that the other fields are empty, and any row with readable values will fill in the higher fields, so that "Joseph" and "joseph@joseph.com" will appear in row 1 (since it is empty) instead of disappearing. If the 4th row was filled up, then its values will appear in the 1st row, but the fifth row values will be discarded. I hope you understand what I'm saying. I appreciate your help... Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Filling up empty values
by mirod (Canon) on Dec 05, 2002 at 10:44 UTC | |
|
Re: Filling up empty values
by ibanix (Hermit) on Dec 05, 2002 at 09:49 UTC | |
by Rachel (Acolyte) on Dec 05, 2002 at 10:52 UTC | |
|
Re: Filling up empty values
by drewboy (Sexton) on Dec 05, 2002 at 19:13 UTC |