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

Posted by Michael Fesser on 11/15/06 18:36

..oO(Shelly)

>If I do a submit and have it come back to the same page, all is fine. If I
>now click the browser refresh button, I get another submittal. How do I
>"unset" the status so that it doesn't think I clicked the submit button when
>I click the refresh button?

After processing the form data use a header() call to redirect the
browser to the same page. If you hit refresh then, the browser just
sends a normal GET instead of repeating his previous POST request.

This also prevents another thing, which could annoy or confuse visitors:
Assume a normal POST submission without a following redirect. If you now
move on to another page and then go back to the previous one using the
browser's 'back' function, in most browsers an ugly message will pop up,
telling you that the page has expired or that is was the result of a
POST operation and asks if the browser should send the POST data again.

Micha

 

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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация