Re: Test for Cookies

From: Date: Wed, 24 Jan 2001 20:49:22 +0000
Subject: Re: Test for Cookies
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-36472@lists.php.net to get a copy of this message
In IE | Tools | Internet Options | Security | Custom Level You'll find 2 items under Cookies - Allow cookies that are stored on your computer - Allow per-session cookies (not stored) Both haveing the options (enabled / prompt / disabled) The cookie test script is succesful if and only if "per-session" is enabled. Okay, my question is: Does the 2nd Cookie Option "Per Session" imply that "that as long as the browser(s) have not been closed down, that as long as any instance of IE is running, that we have infact NOT terminated a "Session" and a cookie which has been set in this session is available? No matter where the user browses to, the number of browser windows he opens, closes, jumps back and forth between (just as long as at least 1 instance of IE is running the entire time), is this "cookie session" still intact?" And what about NS? Karl ----- Original Message ----- From: "Brian V Bonini" <brian@gfx.cncdsl.com> To: "Karl J. Stubsjoen" <karlflips@kstub.com>; "PHP Mailing List" <php-general@lists.php.net> Sent: Wednesday, January 24, 2001 12:56 PM Subject: RE: [PHP] Test for Cookies > You'll need to at least reload the page so > the cookie can be sent back to the server > after it's set..... > > Try this: it's taken directly from the annotations > on the setcookie function page of the php manual. > > <?php > $status = 0; > if (isset($myTstCky) && ($myTstCky == "ChocChip")) $status = 1; > if (!isset($CCHK)) > setcookie("myTstCky", "ChocChip"); > header("Location: $PHP_SELF?CCHK=1"); > exit; > } > ?> > <html> > <head><title>Cookie Check</title></head> > <body bgcolor="#FFFFFF" text="#000000"> > Cookie Check Status: > <?php > printf ('<font color="#%s">%s</font> > ;', > $status ? "00FF00" : "FF0000", > $status ? "PASSED!" : "FAILED!"); > ?> > </body> > </html> > > > -----Original Message----- > > From: Karl J. Stubsjoen [mailto:karlflips@kstub.com] > > Sent: Wednesday, January 24, 2001 1:42 PM > > To: brian@gfx.cncdsl.com; PHP Mailing List > > Subject: Re: [PHP] Test for Cookies > > > > > > > By trying to set a cookie and read it back. > > > > Okay....here is the scenario: > > > > User originates from STATIC Html page, > > Links to my PHP Cookie Test Page > > I set a cookie in my PHP Cookie Test Page > > Can I then check (safely) for cookies right away in my PHP Cookie > > Test Page > > without involving a 3rd page? > > > > Karl > > > > > > -- > > 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 > > > > > > -- > 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 (#36472) next »