ctaustin has asked for the wisdom of the Perl Monks concerning the following question:
I loop through the file and push the different components into a @fields and @types array so that they can be seperated on the form.field|data_field1|value for data field 1 field|data_field2|value for data field 2 type|State=CA|state='CA' type|State=OR|state='OR'
my ($type,$name,$desc)=split/\|/; $x=join ("|", ($name,$desc)); if (lc($type) eq "field"){ push @fields, $x; } elsif (lc($type) eq "type"){ push @types, $x; } ... ... ... foreach $f (@types){ ($name,$desc)=(split/\|/,$f); $desc=~s/\n//g; $name=ucfirst($name); print qq{<tr><td>$name</td> <td><input type="checkbox" name="$name" value="$desc"> +</td> </tr>}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dynamic CGI Form Processing
by cmeyer (Pilgrim) on Jun 14, 2005 at 21:08 UTC | |
|
Re: Dynamic CGI Form Processing
by merlyn (Sage) on Jun 14, 2005 at 21:31 UTC | |
by ctaustin (Sexton) on Jun 15, 2005 at 13:22 UTC |