redirecting

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
cheatboy00
Forum Contributor
Posts: 151
Joined: Sat Jun 29, 2002 10:36 am
Location: canada
Contact:

redirecting

Post by cheatboy00 »

um i have no idea how to do a timed redirect after 10 seconds

like i want to output some text wait 10 seconds then ridrect to another page... and do stuff there.... help please??
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

This should be a JavaScript question really but...

all you have to do is add this line of code into the <head> of your page.

<META HTTP-EQUIV="REFRESH" CONTENT="20;URL=TARGET.html">

Replace the 20 with the number of seconds you want the page to wait for.. and replace TARGET.html with the html (or php) page you want to jump to.

Hope this helps.
User avatar
cheatboy00
Forum Contributor
Posts: 151
Joined: Sat Jun 29, 2002 10:36 am
Location: canada
Contact:

Post by cheatboy00 »

sweet thanks
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Yea with header() you can only do instant transportations since PHP is a preprocessor, meaning before the page displays it's all executed. 8)
Post Reply