sorry, should have droped a bit of code for you to chew on 🙂
//checks to see if the cookie is already set
if(!isset($COOKIE_SET))
{
//sets the cookie
setcookie("makodata", "$account_id", time()+8000);
/(this is the most interesting part)this issues a header for any page you would like to call and passes a variable that resets the cookie so that it can be read(remember that the cookie is only passed back to the server the next time the page is opened). I believe you can also use the $local_php variable if you don't wan to jump to a new page.
Use this url for more info.
http://perl.about.com/compute/perl/library/weekly/aa051600d.htm?terms=cookies/
header("Location:http://127.0.0.1/makodata/contpnl.php?COOKIE_SET=1?COOKIE_SET=1");
}