--- AMC <[EMAIL PROTECTED]> wrote: > What code do I use to redirect a user to a different page in php?
There are several methods, but my favorite is to use a Location header which also changes the response status code. This method is transparent to the history mechanism, so users can still click the Back button. header('Location: http://example.org/'); Another method is to use the Refresh header, which also allows you to set a timer for the redirect. One disadvantage is that it can prevent a user from using the Back button. header('Refresh: 0; url=http://example.org/'); There are also client-side methods of redirecting the user, but this is a PHP list. :-) Hope that helps. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming December 2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php