Jump to content

Redirect page


austine_power007

Recommended Posts

This code, when used before ANY html output, will redirect the user:

[code=php:0]header('Location: http://site.com/page.html');
exit(0);[/code]

If you have displayed any HTML before using that, then you will get an error.

An alternative is to use a meta refresh tag, which I don't remember the syntax for.
Link to comment
https://forums.phpfreaks.com/topic/28195-redirect-page/#findComment-128951
Share on other sites

[quote author=btherl link=topic=116000.msg472438#msg472438 date=1164255761]
This code, when used before ANY html output, will redirect the user:

[code=php:0]header('Location: http://site.com/page.html');
exit(0);[/code]

If you have displayed any HTML before using that, then you will get an error.

An alternative is to use a meta refresh tag, which I don't remember the syntax for.
[/quote]

Thanks a lot man it helps me a lot. Problem solved and topic Closed. :)
Link to comment
https://forums.phpfreaks.com/topic/28195-redirect-page/#findComment-128954
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.