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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to