View Single Post
Old 02-23-2004, 12:46 AM  
galleryseek
Confirmed User
 
Industry Role:
Join Date: Mar 2002
Posts: 8,234
PHP Question.. clearing variables...

say for example you're submitting a form to the page it is on (php_self).. and say you hit the refresh button after submitting that form... all those variables are re-submitted which causes for duplication... how do you avoid that so that you can clear those variables out?

i thought unset($variable) would work, but it doesn't.

the code looks like:

if (isset($comment)) {
$date = time();
$sqlquery6 = "INSERT INTO bgcomments
VALUES ('id','$_SESSION[username]','$uid','$comment','$date')";
$resultse = mysql_query($sqlquery6);

unset($comment);
}
galleryseek is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote