The link in question is there by design and should be there, but below is what I am talking about.
> Even better, if a user cannot be validated then you can redirect them back to where they > came from (referrer). That would effectively achive your goal by > refreshing the original page no matter where they;re coming from. This is what I have, but no matter what I do I can not get a message to appear on the referring page saying you have no access to the other page, and I have also read that 'HTTP_REFERER' is not very reliable.... if($userlevel != $neededlevel) { include ($_SERVER['HTTP_REFERER']); $message = $no_permission; $exit; } ...on referring page.... <? if ($message) { echo $message; } ?> ----- Original Message ----- From: "Leo Spalteholz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 23, 2003 2:06 PM Subject: Re: [PHP] reloading a page.. > On March 23, 2003 10:22 am, Beauford.2002 wrote: > > One other problem is that I need to know the page the came from in > > order to reload it. i.e. if they try to access a restricted page > > from six.html I want to reload six.html - if they try from > > eight.html then eight.html needs to be reloaded. > > Firstly, as David mentioned, if the user is not allowed to access the > page then the link shouldn't be there in the first place. If there > is no link then there is no need to refresh the page or generate an > error or anything. If you really want to you can have the link but > instead of an href to the page you would replace it with a Javascript > alert saying "access denied". > But thats beside the point because if they enter the restricted page > into the address bar directly it also has to deny them access. You > should write a script that checks the users credentials and then > include it at the top of EVERY page. If the user can no be validated > then an access denied message is displayed. Even better, if a user > cannot be validated then you can redirect them back to where they > came from (referrer). That would effectively achive your goal by > refreshing the original page no matter where they;re coming from. > > Leo > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php