I've just written a small perl mailer script. After the script mails the administrator the data, I want the script to jump out to another webpage (which shows a thankyou message).
How do you do this in Perl?
myself
6:50 am on Aug 18, 2003 (gmt 0)
The simpliest way is to print one line: http-header that will redirect user's browser:
Note that the line befor (as a part of http-header) have to be printed before any output of the script. In our simple case the script should not print something else.
Neorio
7:08 am on Aug 18, 2003 (gmt 0)
Cheers, that's saved me a few headaches!
much appreciated.
kroikie
3:32 pm on Aug 28, 2003 (gmt 0)
hi people; i understand the ans given above and agree with it but if the user were to press or click back what would happen then?
IanKelley
12:54 am on Aug 30, 2003 (gmt 0)
Pressing the back button would bring them to the page before the one that did the redirect.
Since the redirect is happening without any output, this would not be a problem.