Blessed 0 Report post Posted April 9, 2007 (edited) Header function Greetings we are going to use the header() funtion to redirect start making a file called page.php at the top of the file add<?php?>Example 1After <?php add header('Location: http://trap17.com;;the LOCATION meanswhere you want it to go. Example 2you also can define a file that you want to redirect toAfter <?php add header('Location: index.php');Example 3you also can add a timer to it After <?php add header('Refresh: 0; url=http://trap17.com; );Refresh: 0; means that it will refresh to the url you entered andthe 0; means the seconds it wait to refresh. Example 4now if you want to go to the root of the site use this After <?php add header('Refresh: 3; url=/');Have fun with this tutorial.. Edited April 9, 2007 by Blessed (see edit history) Share this post Link to post Share on other sites
shadowx 0 Report post Posted April 9, 2007 Hey, nice bit of info there, i never knew you could add a timer to the redirect thingy, that could be very useful. Its worth mentioning that any HEADER function wont work if there is output before it. Eg if you used ECHO or PRINT before using the HEADER it will give an error, i think you can d ther things like form processing, database connections etc but nothing can be output to the browser before the HEADER, that caused me some headaches in the past. Share this post Link to post Share on other sites
Blessed 0 Report post Posted April 9, 2007 thanx shadowx for givven that last info for me thanx for the support Share this post Link to post Share on other sites