Reply to Re: [newbie] How to avoid FFox's "The page you are trying to view..."?

Your name:

Reply:


Posted by no on 12/11/06 09:09

On Mon, 11 Dec 2006 06:16:47 +0100, Vincent Delporte
<justask@acme.com> wrote:

>On Sun, 10 Dec 2006 16:42:18 GMT, no@emails.thx wrote:
>>Submit the form and in your action recall the page and now you're into
>>the first block of code that handles your $_POST[] data. If you
>>refresh this then you will get the message warning you that you are
>>going to resend the POST data again.
>
>That's what I don't understand: The second time around, I'm only
>reading data that were POSTed from the form the first time, so why
>does FFox warn me? I can use a transaction number to check if it's
>already been submitted, and it's just the user hitting F5.

Well, the POST method is just special - it is used primarily where a
script will be taking entered form data and doing something creative
with it - like sending an email or updating a database, so in that
case the user should be warned that they risk running the script
twice, with all the inherant problems that would cause.

Sure, you could trap the script being run twice - but not always. In
some cases it is difficult, verging on impossible to know how many
passes through the script there have been - hence this protection.

AFAIK, there is no way to process POST data without the message coming
up on a refresh because it is a function of the browsers (include
Opera and IE in the list) and not of the script. So, in that case you
just have to write your script to work around it :o)

Best wishes,
Chris R.

[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

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