You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
938 B
Perl

5 years ago
#!c:/perl/bin
use CGI ':standard';
print header();
print "Form Elements", br(), br(), br();
print start_form;
print "A Text Box:       ", textfield('surname', 'Default', 50), br();
print "A Select Box:       ", popup_menu('SelectBox', ['Perl', 'Web', 'Development'], 'Fast');
print p, "Text Area:      ", textarea('comments', 'Default Text', 10, 50);
print p, "CheckBoxes: ", checkbox_group('check1', ['one', 'two', 'three']);
print p, "Radio Buttons: ", radio_group('radio1', ['a', 'b', 'c']);
print p, submit();
print end_form;
if (param())
{
print "The surname you entered was: ",em(param('surname')),
p, "The Selections are: ",em(join(", ",param('SelectBox'))),
p, "The comments box contains: ",em(param('comments')),
p, "you selected checkbox: ",em(param('check1')),
p, "you selected radio: ",em(param('radio1'));
}