Reply to Re: Duplicate records added from post forms, easy solutions?

Your name:

Reply:


Posted by Alvaro G. Vicario on 07/15/06 10:14

*** mindwarp escribió/wrote (15 Jul 2006 02:31:04 -0700):
> If they refresh the script or click back and click submit again I get
> duplicate record.
>
> Is there an easy solution to this?

This simpliest solution is to move user away from insert script. After
inserting data you can use header() to send a "Location" header and
redirect user to another page (which can be even the same, but with an
empty form).

Of course, this is not bulletproof but should be enough.


--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--

[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

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