note 50482 added to function.header
| From: | michael at whypsloven dot net | Date: | Tue, 01 Mar 2005 18:41:32 +0000 |
| Subject: | note 50482 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85742@lists.php.net to get a copy of this message | ||
To redirect the user a certain amount of time after displaying content, use the Refresh, not the
Location header:
<?php
// Redirects the browser instantly
header("Location: http://www.php.net");
echo "This content is not displayed.";
// Redirects the browser quickly
header("Refresh: 0; http://www.php.net");
echo "This content is usually displayed by the browser in the instant before the next page can
be loaded.";
$sec = 10;
// Redirects the browser after $sec seconds
header("Refresh: $sec; http://www.php.net");
echo "This content is displayed for $sec seconds, then the browser will redirect.";
?>
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50482
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50482&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50482&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50482&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50482&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50482&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50482&report=yes
Search -- http://master.php.net/manage/user-notes.php