in reply to How to check value of checkbox on form submit?
All of this is assuming, of course, that you are passing a value to $input. You didn't really specify how you were parsing the form results. One way is the following:
with the HTML set like the others have suggested, giving a value of "on" to the checkbox named "checkbox1".#!/usr/bin/perl -w use CGI; use strict; my $page = CGI::new(); my $input = $page->param('checkbox1'); if ($input eq 'on') { # do something } else { # do something else } exit (0);
|
---|
In Section
Seekers of Perl Wisdom