Page 1 of 1

how to clear the variables from server (cookies)

Posted: Fri Oct 14, 2011 7:56 pm
by grabber_grabbs
You guys are just increadible with become the time to help newbie like me... (sorry poor english here)

Well i am getting at it, slowly but surely.

I am working on my search engine to screen what sql data i want to be display... what puzzle me, is after many hours trying to find why all is mess up, i decided to leave the search field blank, and i did echoed the search field.... and it still show the previous content.... even if i have the value = " " in the input command.....

<form id="form1" name="form1" method="post" action="">
<input type="text" name="varsearch" id="varsearch" size="40" value = " " />
</form>


$varsearch = $_POST['varsearch'];

echo $varsearch;

the results are words that i use during my tests.... in my html code (form above) i have value = " " that is putting the value of varsearch to " "
$_POST should transfer the value to the server, but the server still give me false info....

I did look for some info on this, but i dont understand where i shoud put the command to clear the variable/cookies...

thank you all for your help.

Re: how to clear the variables from server (cookies)

Posted: Fri Oct 14, 2011 8:00 pm
by Celauran
Were you just refreshing the page? That would resubmit old form data.

Re: how to clear the variables from server (cookies)

Posted: Fri Oct 14, 2011 8:08 pm
by grabber_grabbs
its a chance we have you on this forum...

you were right once again.

thanks.