in reply to passing parameters
Use a hidden field:
#!/usr/bin/perl -w # fatalsToBrowser as early as possible. use CGI::Carp qw(fatalsToBrowser); use strict; # You really should! # Load other modules. use CGI qw(:standard); my $oldtable = param('oldtable'); if (not defined $oldtable) { # XXX CGI script shouldn't die; # They should return an HTTP error # with an HTML error message to the # client. die("This document must be opened with the oldtable parameter\n"); } print start_html( -title => foo, -BGCOLOR => bar, -style => { 'src' => foo, 'title' => bar }), start_form, radio_group( -name => 'sortby', -values => [ 'Sort by foo', 'Sort by bar' ]), p, hidden(-name => 'oldtable' -value => '0', -override => 1), submit(-name => 'search', -value => 'Search'), end_form; if ($oldtable) { foo; } else { bar; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: passing parameters
by Anonymous Monk on Jul 27, 2005 at 08:23 UTC |