Page 1 of 1

can't get rid of old variables...

Posted: Fri Feb 27, 2004 7:01 pm
by jojo46
i'm sure this is a dumb question, but i can't seem to figure it out and up until now i've always had a workaround, but i really can't think of a good on this time. the gyst of what i need done is simply to input some info into a form i made. it goes through three stages, first it gets the filename, then the form variables (blank if no filename is entered, the values from the file otherwise), then processing. the problem i seem to be having is that it doesn't clear the variables for the form. when i hit submit and leave the filename text box clear, it still puts the values i inserted into the form from the last time i visited the page. i'm not sure if this is because it's retaining the filename parameter or because it is retaining all the form variables, but either way i need those variables cleared. all and all there are about 150 variables, so i'm hoping for a blanket clear solution or anything else. i would really really appreciate any suggestions around this or a solution to this problem.

Posted: Fri Feb 27, 2004 7:07 pm
by Illusionist
try setting all the variables to "" at the start of the page...
$var = "";

But still i didn't think variables would keep their vaule after you close the page... wierd!!

Posted: Fri Feb 27, 2004 7:18 pm
by redhair
Maybe unset will help.

worked

Posted: Sat Feb 28, 2004 3:13 pm
by jojo46
unset worked, so yay, thanks a bunch, really appreciate it