bradgrafelman;10998569 wrote:Where do you define the variable $s?
EDIT: Also note that [man]setcookie/man does not touch the $_COOKIE array at all - you won't see anything in there until the next page request (when the client starts using the cookie you just set in the response of the current request).
Actually should be this I believe:
setcookie('s', $_GET['s']);
echo "<b>search:</b>".$_COOKIE['s'];
EDIT:
Actually..I see that it's working now but I do see the 'delay' that you mention (next page). is there there any way to access the value on the same page - maybe by using javascript/ajax? Also, i assume i can make this cookie into an array..?
thanks again