Dear all,

How can I add a line (lines) to the following script
so that I can show the results on a new browser window
after I press the submit button?

Thanks,

Li


#!c:/Perl/bin/perl.exe
use warnings;
use strict;
use CGI;

my $query_obj=CGI->new();

#creat webpage
print $query_obj->header;
print $query_obj->start_html('My First Webpage');

print $query_obj->start_form;
print $query_obj->p;

print "What is your name
",$query_obj->textfield(-name=>'text_field',
-value=>'');

print $query_obj->p;
my @major=qw( English Biology Immunology );
print " What is your major
",$query_obj->popup_menu(-name=>'menu_name',-value=>[EMAIL PROTECTED]);



print $query_obj->p,$query_obj->submit; 
print $query_obj->end_form;

print $query_obj->end_html;
#capture the data

 my $name=($query_obj->param('text_field') or ''); 
 print $query_obj->p,"This is your name $name",
"\n\n"; 
 
 print $query_obj->p; 
 my $major=($query_obj->param('menu_name') or ''); 
 print "This is your major $major "; 
 
 exit;  


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to