|
Posted by Kimmo Laine on 11/17/06 13:26
"Mike Scholl" <MikeScholl@btinternet.com> wrote in message
news:n6KdnSHR3vQX6cDYnZ2dnUVZ8tSdnZ2d@bt.com...
>I have written my first bit of php/sql code and set up a website with a
>small database.
>
> I use a html form and submit button to add/edit etc data.
>
> If you are editing data, after you have updated the database, if the user
> presses the back button repeatedly they scroll back through the previous
> screens which show the data BEFORE the update.
>
> I note on some site you get a "this page has expired" message if you try
> to scroll back.
>
> How can I do that? Or in some other way prevent outdated data from being
> displayed.
If you use FORMs, when the form method is POST, you'll get the
expired-notification, but when the method is GET, it will not appear. This
is logical, since get should be used when searching for data, the list needs
to be generated just once, and you can go back to it again, but when
updating or inserting something, POST should be used for posting the data
just once, re-submitting should be rejected, or at least the browser should
issue a warning. Well, most browsers work this way, the magic is the form
method, weather it's POST or GET....
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net | rot13(xvzzb@bhgbyrzcv.arg)
[Back to original message]
|