-
Redirecting
How do I get the page to automaticly refresh to a url based on the subject
i.e.
if
$POST["subject"] = "Join the Mailing List"
goto
reciept.php?what=Thank%20you%20for%20joining
after 3 seconds
if not then goto
reciept.php?what=Sorry%20to%20see%20you%20leave
after 3 seconds
it is relivent to my last post
-
<?php header( Location: http://www.moo.com ); ?>
-
I could be wrong, but doesn't the header have to be encased in quote marks:
-
Yes it do.
New to VB 6: As they've already said, use the header() function. But keep in mind that you can't have any output to the screen before you use it.
That's also a tricky one. Make sure your PHP tags are at the top of your document, no spaces before them, otherwise that'll count as output to the screen.
-
I might be wrong but that header doesnt wait 3 seconds like he wanted.
-
the header("Location: ") is automatic. There is no wait, unless a slow connection to the internet causes that wait. Read the manual.
-
If you want it to be timed
<meta http-equiv=\"Refresh\"content=\"XXX;URL=page.php\">
XXX = number of seconds
-
Yep, but as I've said before some browsers don't support that, so it's better to use the PHP header if you can. Also I think some browsers may have trouble if the URL is not absolute.