Jump to content

Recommended Posts



<?php

// refresh / redirect to an internal web page
// ------------------------------------------
header( 'refresh: 5; url=/webdsn/' );
echo '<h1>You will be re-directed in 5 seconds...</h1>';


// refresh / redirect to an internal web page
// ------------------------------------------
header( 'refresh: 3; url=/' ); # redirects to our homepage
echo '<h1>You will be re-directed in 3 seconds...</h1>';


// refresh / redirect to an external web page
// ------------------------------------------
header( 'refresh: 0; url=http://www.example.net' );
echo '<h1>You won\'t know what hit you!</h1>';
?>
Link to comment
https://forums.phpfreaks.com/topic/13174-php-redirecting-users/#findComment-50665
Share on other sites

[!--quoteo(post=389115:date=Jun 29 2006, 05:08 AM:name=Dville)--][div class=\'quotetop\']QUOTE(Dville @ Jun 29 2006, 05:08 AM) [snapback]389115[/snapback][/div][div class=\'quotemain\'][!--quotec--]
good point

[code]sleep(5); // wait for five seconds
header("Location: http://www.example.com"); // redirects you to example.com[/code]

im still new to this myself, but the above code works with a pause :p
[/quote]

sleep is not part of header but corect flashee lol
Link to comment
https://forums.phpfreaks.com/topic/13174-php-redirecting-users/#findComment-50690
Share on other sites

Thanks Now i want to do a login page. Once the page opens it is sent login info. From there it connects to a databse, creates cookies and then relocates. If i use the header...... will the script still run through the db connect etc.?????


thanks for your previous replys, they'r rally halping
Link to comment
https://forums.phpfreaks.com/topic/13174-php-redirecting-users/#findComment-50699
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.