Jump to content

Archived

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

mccanna

Display and redirect!

Recommended Posts

Is it possible to display a php page for 3 or 4 seconds and then redirect the user back to the main menu page? If so, could you give a simple example or suggest an appropriate tutorial?

Share this post


Link to post
Share on other sites
put this on the bottom of tha page you want displayed for xx seconds.

$sec = 5; // number of seconds until redirect
header("Refresh: $sec; url=http://www.yoururl.php");



Snowdog


[!--quoteo(post=357314:date=Mar 22 2006, 10:26 AM:name=AMcC)--][div class=\'quotetop\']QUOTE(AMcC @ Mar 22 2006, 10:26 AM) [snapback]357314[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Is it possible to display a php page for 3 or 4 seconds and then redirect the user back to the main menu page? If so, could you give a simple example or suggest an appropriate tutorial?
[/quote]

Share this post


Link to post
Share on other sites
Perfect! Thanking you!
[!--quoteo(post=357364:date=Mar 22 2006, 08:04 PM:name=snowdog)--][div class=\'quotetop\']QUOTE(snowdog @ Mar 22 2006, 08:04 PM) [snapback]357364[/snapback][/div][div class=\'quotemain\'][!--quotec--]
put this on the bottom of tha page you want displayed for xx seconds.

$sec = 5; // number of seconds until redirect
header("Refresh: $sec; url=http://www.yoururl.php");
Snowdog
[/quote]

Share this post


Link to post
Share on other sites
[!--quoteo(post=357314:date=Mar 22 2006, 10:26 AM:name=AMcC)--][div class=\'quotetop\']QUOTE(AMcC @ Mar 22 2006, 10:26 AM) [snapback]357314[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Is it possible to display a php page for 3 or 4 seconds and then redirect the user back to the main menu page? If so, could you give a simple example or suggest an appropriate tutorial?
[/quote]


Yes, you can use a meta refresh

[code]
<meta http-equiv="Refresh" content="3; URL=http://www.yourdomain.com/yourpage.php" >
[/code]

where 3 is the amount of seconds you want to display the page for.

Seamless

seems like i need to refresh my page more :P

Share this post


Link to post
Share on other sites
[!--quoteo(post=358812:date=Mar 27 2006, 10:24 AM:name=AMcC)--][div class=\'quotetop\']QUOTE(AMcC @ Mar 27 2006, 10:24 AM) [snapback]358812[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Perfect! Thanking you!
[!--quoteo(post=0:date=Mar 22 2006, 08:04 PM:name=snowdog)--][div class=\'quotetop\']QUOTE(snowdog @ Mar 22 2006, 08:04 PM)[/div][div class=\'quotemain\'][!--quotec--]
put this on the bottom of tha page you want displayed for xx seconds.

$sec = 5; // number of seconds until redirect
header("Refresh: $sec; url=http://www.yoururl.php");
Snowdog[/quote]
[/quote]
Make sure you use the header function before the output of any text/html otherwise PHP will report back a warning error and your script wont run.

Share this post


Link to post
Share on other sites

×

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.