On Tuesday, April 16, 2002, at 11:32 AM, Scott St. John wrote:
> What I am also discovering is I have to use die; to halt execution for
> certain things. An example, I check to see if a user is still active in
> the system, if they are not I use a header to redirect them to a page
> that
> tells them they are inactive.
>
> if ($userActive == 0){
> header ('Location: notice.php');
> }
>
> As is it does not work until I do this:
>
> if ($userActive == 0){
> header ('Location: notice.php');
> die;
> }
>
That's strange, I never have to use "die". Try using an absolute path
in header(), like header('Location: http://domain.com/notice.php'), that
may fix this (not sure). Also make sure that header() is executed
before any HTML is output from the PHP processor, this is a common
mistake for new PHP coders. Even a single line of whitespace sent
before the header() line will screw it up, and this applies to all
header() types, not just "Location:".
Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php