I tested your code and it doesn't seem to work.
In a page (cookie.php4), I have this code :
<?
$memberid=123;
if (!isset($my_memberid))
setcookie("my_memberid", $memberid, 0, "/", "", 0);
?>
And in another page (cookie2.php4), I have :
<?
if (isset($my_memberid))
echo "memberid=$my_memberid";
?>
I first call cookie.php4 to set the cookie. Then, I call cookie2.php4 and it works (it displays "memberid=123").
But, if I close my browser (IE5) and I call directly cookie2.php4, it doesn't display the cookie value.
How can I keep the cookie permanent ?