Praveena Vittal wrote:
Gunnar Hjalmarsson wrote:
Praveena Vittal wrote:
Gunnar Hjalmarsson wrote, On 08/27/2007 07:36 PM:
Praveena Vittal wrote:
#!/usr/bin/perl
use CGI;
my $query =new CGI;
<----some other stuffs will be here-->
print $query->redirect('http://google.com');
When i run this code
How do you run it? Is the script URL in the action attribute when
POSTing an HTML form? In that case, and if you want the request to be
redirected, the _only_ code you need is:
#!/usr/bin/perl
print "Status: 307\nLocation: $location\n\n";
Run this code means,refreshing the url to see the changes ...
But then there aren't any POSTed parameters to be passed along with the
redirect, are there?
The function below is called when a button is pressed in a cgi page
Aha, a _button_. But then, after all, the script URL _is_ in the action
attribute when POSTing an HTML form, right? Why didn't you confirm that
before??
Also pls follow Dr. Ruud's (and my) advice about a _complete_ script. It
doesn't need to be the full code; it's probably better if you write a
separate small script that we can copy and run and that exhibits the
problem.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/