Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Menus

Status
Not open for further replies.
Jun 20, 2003
40
GB
Let's start of with the code :

my $cur = $dbh->prepare("SELECT Device_Name FROM tbl_admin_systems");
$cur->execute();

my $menudata = $cur->fetchall_arrayref();

my $q = CGI->new;

my $action = "/cgi-bin/serverstatus.pl?";
my $menu_value = $q->url_param('ServerList');
my $submit = $action.$menu_value;

print $q->header;
print $q->start_html(-title=>'Menu');
if (!$q->param) {
print $q->start_form();
print $q->popup_menu(-name=>'ServerList', -values=>[map {$_->[0]} @{$menudata}]);
print $q->br;
print $q->br;
print $q->submit(-name=>'Status Report');
print $q->end_form;
} else {
print $q->parm(Status Report);
}
print $q->end_html;
$cur->finish();

What I'm trying to acheive is an new html page created using the action '/cgi-bin/serverstatus.pl' plus the menu selection such as 'SVR1'. The resulting url would be
Not to sure where I'm going wrong or if this is possible to do.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top