I've run a search on all forums here, and can't figure out what it is that i'm doing differently than everyone else who gets unset to actually unset the variables. What I've got is a form that calls the current page, which runs the following code at the top -
if($_POST['simpQues'] == "yes"){
colData($_POST);
unset($_POST['radio']);
unset($_POST['tv']);
unset($_POST['pub']);
unset($_POST['age']);
unset($_POST['refip']);
unset($_POST['browser']);
unset($_POST['simpQues']);
unset($_POST['Submit']);
}
simpQues is a hidden form field that is set to value "yes", so whenever the form is submitted, it should be set to make the function run, right? And when it's not set, the function won't. I hope.
Problem is, whenever anyone hits the refresh button, the $_POST vars are not unset, therefor running the colData function again and entering the same data into the database. Again.
What exactly am I missing with this one? Everything I can find says this should work - I tried it on my home system and it did, for one variable. But here at work, it's just not unsetting anything at all! Any hints or tips or places to look for further explanation?