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"]))
                $addStatusSQL="INSERT INTO status values(Null,'$thisStatus')";

                        or die(mysql_error());

Many wondrous things happen in here...
And here's the form code from the bottom of the page:

                <form action="bookStatAdmin.php" method="post">
                                <tr><td><input type="text" 
                                <tr><td><input type="submit" 

Any suggestions?

Thank in advance.


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to