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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirection to the next page 1

Status
Not open for further replies.

stuartd

Programmer
Jan 8, 2001
146
US
Hi,

I am trying to get a perl script to do some processing (decide what to do next) and then redirect to the next page.

Here is code snippet:
if ($query->param('button') eq 'Next')
{
$url="next.pl";
}
else
{
$url="last.pl";
}

print $query->redirect($url);

When i run this code I get
"Status: 302 Moved location: last.pl "

How do i get my script to redirect to the next (perl) page?

SD
 
Somewhere in your code (before the redirect) I would bet you have a line print $query->header; which is causing your issues.

- Rieekan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top