Richie,
Yes to both. Inserting the cookie is no prob. Simply call setcookie(), pass it the arguments you want (ie. the name, the value, and/or the path). Leaving out the Time To Live (or expiry) argument will cause the browser to delete the cookie either when it shuts down or the next time it starts up. At least this is the case with Netscape/Mozilla. About IE I'm not sure, God only knows how that thing works most of the time🙂 More info about setting cookies in PHP is found at:
http://www.php.net/manual/en/function.setcookie.php
Details about Netscape's cookie spec are at:
http://www.netscape.com/newsref/std/cookie_spec.html