I have a script where I allow a user to add, edit or delete information from a database. I normally have three seperate sets of pages for each function, i.e. the form on one page, and the processing on another. In an attempt to make things cleaner I am integrating all of the scripts into one. My only problem is, if a user should decide to click refresh (for what ever reason) after perviously adding some info to the database, the info is added again, and again on any further refresh. Does anyone know of a method to prevent this, maybe by clearing the variables from the browser cache or something? - I don't know how this works technically at a browser level...
Heres a demo script to give you an idea of the kinda script I have:
mysql_query("INSERT INTO `table` (`name`) VALUES ('$_POST[name]')");
<form name="add" action="" method="post">
<input type="text" name="name"/>
<input type="submit" name="submit" value="Insert"/>