Re: How to prevent stop back button calling myurl?mode=del&customer=name
| From: | O. | Date: | Thu, 20 Jul 2000 20:25:26 +0000 |
| Subject: | Re: How to prevent stop back button calling myurl?mode=del&customer=name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7471@lists.php.net to get a copy of this message | ||
"Helen Lord" <helen.lord@staff.smartgroups.com> wrote in message
news:39773F62.E43D9C7A@staff.smartgroups.com...
> Hi,
>
> I have a form where customer names are displayed as a hyperlink to allow
> editing, deletion etc..., e.g.
> http://mysite.com/main/customer.php?mode=del&customer=name
>
> I click on the "delete customer X" link and everything works as it
> should and X gets deleted.
>
> If I then click the back button on my browser, I recall this url and it,
> not-surprisingly :-), tries to repeat the same operation. Is there
> anyway to prevent this?
>
If $customer doesn't exist {
This customer has already been deleted
} else {
delete customer
}
Setting a persistent (read session) variable of some sort indicating who was
just deleted would be even better, as checking to see if the customer was
deleted probably requires a database access or two.
> I have tried many header options for disabling caching but this is not
> the HTML I am trying to stop being cached, it is the URL itself.
Caching is not the problem ...
>
> This is not an uncommon way to provide actions to users, so somebody
> somewhere must have worked out how do this - surely ;-) It would apply
> to CGI, ASP, ColdFusion and any other serverside language as well, it's
> just that I'm using PHP.
The language isn't the problem either.
>
> I have tried this with IE5 and Navigator 4.73
>
Ain't the browser either.
--
O.