in reply to FormBuilder
#!/usr/bin/perl use CGI; use strict; use warnings; use CGI::FormBuilder; # your scripname goes here my $self="form-test.cgi"; my %hash = ( video => "format director producer acter", audio => "album song", picture => "photographer style size", ); my $cgi_instance=new CGI; print $cgi_instance->header; my $approved_todo=$cgi_instance->CGI::param('todo'); if (defined($approved_todo)) { #going inside here if $act is defined print "you selected ".$approved_todo."<br>"; #your complete CGI::FormBuilder Code goes here my @all = $hash{$approved_todo}; my $form1=CGI::FormBuilder->new( fields=> \@all, # and so on with your FormBuilder Code } else { #go inside here if $act not defined print "choose your way of uploading<br>\n"; my @temp_array=keys %hash; foreach my $temp_todo (@temp_array) { print "<a href=\"".$self."?todo=".$temp_todo."\" act=1>".$temp_tod +o." upload</a><br>\n"; } }; print $cgi_instance->end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: FormBuilder - here is some working code
by ile (Initiate) on Sep 23, 2003 at 07:35 UTC |