Re: Forms and destroying values

From: Date: Fri, 12 Jan 2007 08:30:37 +0000
Subject: Re: Forms and destroying values
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-246977@lists.php.net to get a copy of this message
It doesn't help to reset any values. The form data is being resent by the browser itself, just if the user presses the submit button again with the same data. What you could do is mabye use a session to see if the particular user has sent form data before. /Fredrik Thunberg Beauford skrev:
Hi, How do I stop contents of a form from being readded to the database if the user hits the refresh button on their browser. I have tried to unset/destroy the variables in several different ways, but it still does it. After the info is written I unset the variables by using unset($var1, $var2, $etc). I have also tried unset($_POST['var1'], $_POST['var2'], $_POST['etc']). I even got deperate and tried $var = ""; or $_POST['var'] = ""; What do I need to do to get rid of these values??? Obviously I am missing something. Any help is appreciated. Thanks


« previous php.general (#246977) next »