I have a page that maintains a very simple list of items. The page shows the current items on the list and provides an <input> field for the user to add new items to the list. Everything works great. The only problem I'm having is that each time the user clicks the Refresh button on the browser, I get that dialog box telling me "The page cannot be refreshed without sending the information." Then the last value is added to the database again and again and again each time the user hits the Refresh button. In know that's a browser "feature" that I can't control, but is there a way that after submitting the information to the database using the form and associated SQL statements, I can unset the variables. I've already tried unset($sql) and unset($variable), but to no avail.
Here's the php code from the top of the page: if (isset($_POST["newStatus"])) { $thisStatus=addslashes($_POST["newStatus"]); $addStatusSQL="INSERT INTO status values(Null,'$thisStatus')"; mysql_query($addStatusSQL) or die(mysql_error()); unset($_POST["newStatus"]); unset($addStatusSQL); } . . . Many wondrous things happen in here... . . . And here's the form code from the bottom of the page: <form action="bookStatAdmin.php" method="post"> <table> <tr><td><input type="text" name="newStatus"></input></td></tr> <tr><td> </td></tr> <tr><td><input type="submit" name="submit"></input></td></tr> </table> </form> Any suggestions? Thank in advance. Rich -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php