Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
How can I get the complete input of the form and write it into a file without using cgi.pm? I tried it with something like this, but that doesn't work:... <form method="post" action="$ENV{'SCRIPT_NAME'}?action=add_2&Month=$se +lected_month&Year=$selected_year"> <table align="center" border="0" cellpadding="1" cellspacing="0" width +="100%"> ~; print qq~<tr>\n~; @data = (PTG1, PTG2, PTG3, PTG4, F1, F2, F3, F4, R1, R2, R3, R4, J +S1, JM2, JL3, JX4); foreach $key(@data) { print qq~<td><b>$key</b></td>\n~; } print qq~</tr> <tr> ~; foreach $key(@data) { print qq~<td> <select name="$key" size="13" multiple> <option value="-1" selected></option> ~; $days_in_this_month = $days_in_month[$input{'Month'}]; if ( $input{'Month'} == 2 and leap_year($input{'Year'})) { $d +ays_in_this_month = 29; } for ($i=1; $i<=$days_in_this_month; $i++) { print qq~<option value="$i">$i</option>\n~; } print qq~</select> </td> ~; } print qq~</tr> </table> <center> <input type="submit" name="submit"> <input type="reset"> </center> </form> ...
As you can see I'm a complete perl-newbie and would be very grateful for any help ;-)... open (DAT, ">$db_file"); if ($flock eq "y") { flock DAT, 2; } for ($i=1; $i<=$days_in_this_month; $i++) { print qq~$i. $input{'Month'}. $input{'Year'}~; foreach $i (1..16) { foreach $i (keys (%input)) { if ($input{'$i +'} == -1) { $input{'$i'} = "---"; } else { $input{'$i'} = "$name"; } print qq~|$input{'$i'}~; } } print DAT qq~\n~; } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multpile checkbox handling?
by LD2 (Curate) on Apr 14, 2001 at 21:28 UTC | |
|
Re: Multpile checkbox handling?
by kha0z (Scribe) on Apr 14, 2001 at 23:50 UTC | |
|
Re: Multpile checkbox handling?
by eejack (Hermit) on Apr 15, 2001 at 09:33 UTC | |
by Beatnik (Parson) on Apr 15, 2001 at 17:13 UTC | |
|
Re: Multpile checkbox handling?
by Anonymous Monk on Apr 15, 2001 at 23:14 UTC | |
by eejack (Hermit) on Apr 16, 2001 at 09:11 UTC |