Reply to Ensuring a web page refresh doesn't create a new record

Your name:

Reply:


Posted by Sam on 11/18/05 17:38

Hi,

Another question:

As per my previous post, my database is very simple: User ID, Country,
Postcode and Date.

This information is entered through the browser via a standard form
which works well.

Problem: If the user clicks on the browser's refresh button, the same
data gets added to my SQL database as a new record. Everytime refresh
is hit, a new record is added with the same data.

What's the best way to prevent this from happening?

I know you can set fields as being unique in MySQL, but can you set -
say - an entire row? So another duplicate row containing all of the
same values could not be written? This would be sufficient for my
needs!

Thanks in advance!

Sam Day.

[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

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