Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
in test.cgi i want to confirm which checkbox was checkedlots of rubbish here <FORM ACTION="test.cgi" METHOD="POST" ENCTYPE="multipart/form-data"> <input type="checkbox" name="option_and" value="AND">ANDfilter<br> <input type="checkbox" name="option_or" value="OR">ORfilter<br> <INPUT TYPE="submit" NAME="Submit" VALUE="Submit"> </FORM>
However, when i check the OR box test.cgi prints FilterAND not FilterOR. Any suggestions? Thanksprint "Content-type: text/html\n\n"; print "<html><head><title>TEST</title></head>"; $queryand = new CGI; @array_and = $queryand->param('option_and'); @array_or = $queryand->param('option_or'); if (@array_and = 'AND') {print "<P>FilterAND = @array_filter";} if (@array_or = 'OR') {print "<P>FilterOR = @array_filter_or";} print "</html>";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: form cgi
by cbro (Pilgrim) on Jun 29, 2005 at 16:38 UTC | |
by Anonymous Monk on Jun 29, 2005 at 18:14 UTC | |
|
Re: form cgi
by sk (Curate) on Jun 29, 2005 at 16:28 UTC |