PDA

View Full Version : CGI redirect


Lihong
01-26-2007, 11:18 PM
Hi,

I created a login form using cgi and once the users click Submit button, it goes to the verify page to check the login info. If it is not correct, there is a link to go to the login page again. if it is correct, it will jump to another CGI page. The question is how I can let it jump to another cgi page. I tried "print redirect ("<another_page.cgi>)", but it shows "302 status moved...", which is not what I want, I want it jump to the new cgi page. How can I do this? Your help is really appreciated.

mlseim
01-28-2007, 04:04 PM
Try this ...

$redirect="another_page.cgi";
print "Location: $redirect\n\n";

You just have to make sure you don't output
anything to the screen before you do Location:
(it has to execute without a header).