The setcookie() function enables you to set a cookie (although you could also output a Set-Cookie header using the header() function).
You can delete a cookie by calling setcookie() with a date that has already passed.
The urlencode() function translates a string so that it can be included in a query string.
The entire query string is made available to you in the $_SERVER['QUERY_STRING'] element.
The $_GET array contains the name/value pairs submitted as part of a query string.