Re: reloading a page..

From: Date: Mon, 24 Mar 2003 06:14:45 +0000
Subject: Re: reloading a page..
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-140803@lists.php.net to get a copy of this message
On March 23, 1998 08:53 pm, Beauford.2002 wrote: > It's definitely going through the if statement as it does "reload" > the page - print($_SERVER['HTTP_REFERER']); shows > http://www.myserver.com/oldpage.html - which is correct. > print("{$userlevel} and {$neededlevel}"); also shows the correct > info. $no_permission does have a string, but even if I hard code > the message it still doesn't work. > > Note though....if I take out include ($_SERVER['HTTP_REFERER']); > from the if statement and put in print($_SERVER['HTTP_REFERER']); > and print $message - they both display. > > So I am at a loss.... OH!!!! I think I've got it. the problem is that you're including the page before you set the message. So of course in the include the $message will still be an empty string and therefor not display it. so rearange the two lines like this: $message = $no_permission; include ($_SERVER['HTTP_REFERER']); and it should work. HTH, Leo

« previous php.general (#140803) next »