RE: [PHP] headers and redirect
| From: | John W. Holmes | Date: | Wed, 05 Feb 2003 17:41:29 +0000 |
| Subject: | RE: [PHP] headers and redirect | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-134446@lists.php.net to get a copy of this message | ||
> I have a question about clearing or resetting headers. My script
executes
> a
> function based on the variables passed to it, such as:
>
> events.php?action=add
>
> However, when the function is finished, I need to redirect to
"events.php"
> with no variables, because refreshing the page causes another event to
be
> added. I tried:
>
> header("Location: ./php/events.php");
>
> But that did not reset the headers. Any tips?
www.php.net/header
the correct syntax is
header("Location: http://www.yourdomain.com/php/events.php");
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/