Welcome Guest, Not a member yet? Register   Sign In
Redirect showing text
#1

[eluser]matt2012[/eluser]
I want to be able to post to page1
which displays 'Wait while we redirect you'
then redirect to page2

In other words do what happens on this forum when you submit a search.

The problem is I know you cant redirect using headers if you output onto the page

so hows it being done - I assume its not javascript.
#2

[eluser]Pascal Kriete[/eluser]
It's done using a meta refresh:
Code:
<meta http-equiv="refresh" content="5;url=http://example.com/" />

Where 5 is the amount of seconds to wait before redirecting.
#3

[eluser]matt2012[/eluser]
Cheers Pascal

Id forgotten about those.

Thanks for that.
#4

[eluser]Mark Skilbeck[/eluser]
As long as your header is before any output, you can do this (it will show your html also):

Code:
header("Refresh: 5; url=http://yoursite.com");




Theme © iAndrew 2016 - Forum software by © MyBB