Re: Help w/Cookie Problem

From: Date: Thu, 15 Mar 2001 17:55:44 +0000
Subject: Re: Help w/Cookie Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-44079@lists.php.net to get a copy of this message
just looking at what you said quickly, what about scope? if i can't access something inside a function, its usually because i haven't declared it global...does this not apply to cookies? jack Jack Sasportas wrote: > > If I have a cookie request in a function, and check the value of a > cookie, I get that there is no value, if I check for the value outside > of the function, I see the value. > > What should I do to ? ( SAMPLE BELOW ) > > function f_check_security() { > # $c_uas_time is the cookie I want the value of > if(isset($c_uas_time)) { > # I tried the above way to just check that it is there, then I tried > the below to check the value > # if($c_uas_time=="GREEN") { > $access="GRANT"; > > > setcookie("c_uas_time","GREEN",(time()+200),'/','domainname.com',0); > > } else { > $access="DENY-GREEN"; > } > > return($access); > } > > I also tried this below to try and get the value .... > echo "HTTP->" . $HTTP_COOKIE_VARS["c_uas_time"]; > > I appreciate your time....and look forward to stop banging my head > against the wall.... 8^) > > ___________________________________________________________ > Jack Sasportas > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#44079) next »