Jump to content

Php Redirecting Users


PC Nerd

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

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.