how to clear the variables from server (cookies)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
grabber_grabbs
Forum Commoner
Posts: 60
Joined: Mon Oct 10, 2011 6:13 pm

how to clear the variables from server (cookies)

Post 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.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

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

Post by Celauran »

Were you just refreshing the page? That would resubmit old form data.
grabber_grabbs
Forum Commoner
Posts: 60
Joined: Mon Oct 10, 2011 6:13 pm

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

Post by grabber_grabbs »

its a chance we have you on this forum...

you were right once again.

thanks.
Post Reply