Re: Cookie Not Setting..

From: Date: Wed, 11 Jul 2001 13:47:05 +0000
Subject: Re: Cookie Not Setting..
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-57380@lists.php.net to get a copy of this message
Actually, nevermind. I got it. I was calling a function and sent the variable with the function so it worked :) ----- Original Message ----- From: "Jeff Lewis" <jeff@hyrum.net> To: "Magnus Hammar" <magnus@programmering.nu>; <php-general@lists.php.net> Sent: Wednesday, July 11, 2001 9:38 AM Subject: Re: [PHP] Cookie Not Setting.. > Still no luck. Do I have to read a cookie before any HTML is sent as well? > I know to set it before it is sent but reading? > > Jeff > ----- Original Message ----- > From: "Magnus Hammar" <magnus@programmering.nu> > To: "Jeff Lewis" <jeff@hyrum.net>; <php-general@lists.php.net> > Sent: Wednesday, July 11, 2001 9:30 AM > Subject: Re: [PHP] Cookie Not Setting.. > > > > Try this: > > > > $cookie_name = "wwblCookie"; > > $value = "PLEASE"; > > $exp = time() + (86400 * 365); > > $server = "www.domain.com"; // Or IP-address will also do fine > > // the domain must cuntain three "." > > // as in ".somedomain.com" > > $secure = 0; > > setcookie($cookie_name, $value, $exp, "/", $server,$secure); > > > > > > /Magnus Hammar > > -------------- > > > > > > -- > > 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 (#57380) next »