Reply to Re: Refresh problem and posts

Your name:

Reply:


Posted by John on 09/19/05 10:20

On Sun, 18 Sep 2005 18:14:20 +0100, John <yuiouio@dfghfgh> wrote:

>I have a problem with refresh.
>
>I have a contact form that sends an email when the submit button is
>pressed. I have a hidden variable and the code for emailing is only
>executed if the variable is set. The variable is cleared at the end of
>the code. All works as expected unless the REFRESH button is pressed
>by the user in which case the script is executed and the emails are
>sent once more. Debugging shows the test variable is set again even
>though it was unset before exiting on the previous run. How can this
>be?
>
>I know there are some things I could do like using database entries or
>cookies to hold the variable or even jump to another page which I do
>not want to do.
>
>There must be a simple explanation and hopefully solution to this.

Thanks as ever for a great response and new ideas.

I did as Douglas suggested and reloaded the page with a GET which I
could test for. It also provided a thank you page which can then be
refreshed with no repercussions as Peter advised.

BTW its not about not being bothered but finding elegant solutions.

My thanks to a great group once again.

--
John

[Back to original 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

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