I have been playing with this at home.

Perhaps this makes it a bit easier.....

boolean setcookie ( string name [, string value [, int expire [, string
path [, string domain [, int secure]]]]])
boolean setcookie (name, value, expire, path, domain, secure)

<?php
        if(!isset($_COOKIE['userInfo'])){ 
        
setcookie("userInfo","temp",0,"/","faxonautoliterature.com",0);
                print "set temp";
        } else {
                if($_COOKIE['userInfo']=="temp"){ 
        
setcookie("userInfo","userID",time()+60*60*24*30,"/","faxonautoliteratur
e.com",0);
                        print "set info";
                }
        }
?>

Fwiw, a solution from another project:
<?
        if (empty($_COOKIE["uuid"])){
                $token = md5(uniqid(rand(),1)); 
                setcookie ("uuid", $token,
mktime(23,59,59,2,28,2003),"/poll/","ukiuki");
                print "Cookie set: ".$token;
        } else {
                print "Cookie exits: ".$_COOKIE["uuid"];
        }

?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to