Re: reloading a page..
| From: | Leo Spalteholz | Date: | Sun, 23 Mar 2003 19:06:40 +0000 |
| Subject: | Re: reloading a page.. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140768@lists.php.net to get a copy of this message | ||
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