Re: Re: basic set and read a cookie probs

From: Date: Thu, 25 Dec 2003 08:02:16 +0000
Subject: Re: Re: basic set and read a cookie probs
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-173318@lists.php.net to get a copy of this message
On Wednesday 24 December 2003 10:15 pm, Jack E. Wasserstein, DDS, Inc. wrote: > Sorry, > > No such thing as $_POST_VARS next time you're having problems, try doing an error_reporting(E_ALL); It really helps a lot, though I'll admit it can be a bit finicky :) Oh and don't forget to turn it off when you're done w/ development > > > > > "Jack E. Wasserstein" <Jack@Wasserstein.com> wrote in message > news:20031225005706.11105.qmail@pb1.pair.com... > > > I am using the following code on the php form handler > > > > if ($_POST[referdrremember] == "true") { > > setcookie("remailcookie", > > > > "$_POST_VARS[refdremail]",time()+3600,"/","wasserstein.com","0"); > > > > Try to see the cookie in the same script, not sure which one to use with > > or > > > without $ > > > > print " the cookie's value is $HTTP_COOKIE_VARS[remailcookie] "; > > print " the cookie's value is 2 $HTTP_COOKIE_VARS[$remailcookie] "; > > > > In addition when I get back to the calling form and refresh it I try to > > see > > > the cookie with this: > > > > if ($HTTP_COOKIE_VARS[remailcookie]) { > > print ("remail cookie exists"); } > > else { > > print ("no cookie"); > > } > > > > This yeilds "no cookie" > > > > I have also tried $_COOKIE[] as well > > > > > > What am I doing wrong. > > > > Thanks in advance, > > > > Jack -- Evan Nemerson evan@coeus-group.com http://coeusgroup.com/en -- "It is an unfortunate fact that every man who seeks to disseminate knowledge must contend not only against ignorance itself, but against false instruction as well. No sooner do we deem ourselves free from a particularly gross superstition, than we are confronted by some enemy to learning who would set aside all the intellectual progress of years, and plunge us back into the darkness of mediaeval disbelief." -HP Lovecraft

« previous php.general (#173318) next »