I spent several days on this problem, and never fixed it. Perhaps, a wise perl monk can see my problem and explain it to me.
I have a form that I use this code for:
print $cgi->start_form(-name=>'new', -method=>"$FORM_METHOD", -action=>'secalert_display.cgi', -target=>'_top'); print $cgi->submit(-value=>'Enter a new record for a Secalert'); print $cgi->hidden(-name=>'MODE', -value=>'new'); print $cgi->endform;
It compiles cleanly, but at runtime (when I execute the CGI from a browser) and click on the 'Enter a new record for a Secalert' button, It doesn't work. The best I can figure is that it doesn NOT sent the hidden field along with the rest of the stuff.
Now, if I replace this CGI.pm code with simple print statements, as in:
print("<form name='new' method='$FORM_METHOD' action='secalert_display +.cgi' target='_top'>\n"); print("<input type='submit' value='Enter a new record for a Secalert'> +"); print("<input type='hidden' name='MODE' value='new'>\n"); print("</form>\n");
It works fine. Can somebody see what the problem with the CGI.pm version is?
In reply to Whats wrong with this code. by kmullin5016
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |