Is there any way to delete a cookie upon the closing of the user's browser?
Yes, specify a time in the past as the expiry date when you set the cookie. The browser doesn't actually delete the cookie until the next time the browser starts, but it achieves the same purpose. If it absolutely has to be deleted on browser shutdown, you'll need to look elsewhere than PHP..... that's client-side stuff.
http://www.php.net/manual/en/function.setcookie.php http://www.netscape.com/newsref/std/cookie_spec.html
-geoff