Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > Next Page gets ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1435 of 1496
Post > Topic >>

Next Page gets downloaded in Perl

by visitprakashindia@[EMAIL PROTECTED] (Praki) Dec 12, 2007 at 10:20 PM

Greetings All

I have a Perl file in which i m doing all the operaions in one file
based on the command line arguments.
login.cgi
..
..
..
$query = new CGI;
$sid = $query->cookie('CGISESSID') || $query->param('CGISESSID') ||
undef;
$submit_value=$query->param("submit");

if ($sid ne ""){
print $query->header( -cookie=>$cookie );}
else{
print "Content-type: text/html";}

if ($sid eq "" && $submit_value eq "") {
   &auth_page(" Login Authentication"," Login Authentication");
   print "Session id: ";
   print $sid;
   print "\n Submit value:";
   print $query->param("submit");

   print $FORM{'uid'};
   print $query->header( -cookie=>$cookie );
   &print_trailer();
 exit(0);
}
elsif ($sid eq "" && $submit_valu ne "") {
	&print_header(" Login Authentication"," Login Authentication");
        &print_trailer();
	exit(0);
}
..
..
..
when i open the for the first time it should go to

if ($sid eq "" && $submit_value eq "")  this condition as both will be
empty. and here i m getting the login information and again i m
calling the same file(login.cgi). now as the sumbit value will not be
empty it has to go the next condtion

elsif ($sid eq "" && $submit_valu ne "") .i m validating the
credentials here. but the problem here i face is the page info which
is to be displayed in the browser is automaticaly asks for File
Download. when downloaded that file and check by open in the new
window it displays the ouput. i could not understand the problem so
plz can u help me in clearing this problem...

where i m going wrong..
thanks,
Prakash
 




 1 Posts in Topic:
Next Page gets downloaded in Perl
visitprakashindia@[EMAIL   2007-12-12 22:20:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 11:51:01 CST 2008.