PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have an application that is in PHP and MySQL. When a button is pressed it will perform and action on the database either to add, edit or delete data that a user has entered. When adding data after the refresh button is pressed at the top of the page the data is added again, so you get another occurence of the data. Is there anyway of stopping this happening.
put a hidden field in the form with a random number in it.. add this number to the database, if it already exists (and the data is the same), don't save the data...
You could just check the data and skip the random number ofcourse.. (perhaps at some time you would want to add the same data twice..)