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

Your name:

Reply:


Posted by Vincent Delporte on 12/11/06 05:16

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.

>If you are really doing a post-type transaction with the data then
>that post message is going to help you and stop you submitting another
>copy of the form. But if you're just using the post data to read a
>table or something where you are getting or displaying data then use
>the GET method instead and you won't have any problems.

I prefer not to use the GET method because I'd rather keep the URL
clean in case users bookmark them.

>Alternatively, you can avoid the post message by doing your processing
>(with no HTML output) and then use the header() function to redirect
>the page somewhere else. This doesn't just redirect like the <meta>
>redirect - it replaces the current page with the one you request - so
>a refresh or back-page doesn't drop through the posting part of yoru
>script again.

OK, I'll check it out.

Thanks!

[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

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