You are here: Re: Back Button « PHP Programming Language « IT news, forums, messages
Re: Back Button

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)

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация