<?php $fh = fopen('/tmp/cookie-data','w') or die("can't open: $php_errormsg"); if (-1 == fwrite($fh,$_COOKIE['flavor'])) { die("can't write: $php_errormsg") }; fclose($fh) or die("can't close: $php_errormsg"); ?>