Using HEADER to redirect
| From: | Don | Date: | Thu, 06 Dec 2001 17:56:37 +0000 |
| Subject: | Using HEADER to redirect | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-76921@lists.php.net to get a copy of this message | ||
Hi,
I have a PHP script that uses the following code to redirect to a page of the user's choice:
header("Location: http://www.mypage.net/");
In examples of this type of coding in various scriots, the above line is always followed by the
statement:
exit;
I am wondering why. When executing a Header("Location"); statement, does control return
to the PHP script after execution? In that case, I assume that the exit; statement is there in
order to terminate the php script. In that event, can I execute code within my script after calling
the Header("Location") page?