Re: Cookies problem

From: Date: Mon, 17 Jan 2000 06:09:56 +0000
Subject: Re: Cookies problem
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-14699@lists.php.net to get a copy of this message
I tried putting setcookie before header, but thats also not working. In this case cookies are not getting set. In fact when I use setcookie with header combined in any order cookies are not set. Without header, cookies are working fine ! regds -mukul Ps: But I want both setcookie and header to work simultaneously. At 10:17 AM 1/14/00 -0600, Dominic J. Eidson wrote: >On Fri, 14 Jan 2000, Mukul Gandhi wrote: > >> In a PHP script, I want to set the cookies on the client *and* also >> redirect control to another page say "www.php.net". To achieve this I am >> writing the code - >> header("Location: http://www.php.net"); >> setcookie("LOG",$logname); >> setcookie("PASS",$passwd); > >SetCookie( .... ); >SetCookie( .... ); >Header("Location: http://www.php.net/"); > >There is an addendum to the setcookie help file about having setcookie() >before the Location: - redirect. > > >-- >Dominic J. Eidson -------------------------------------------------------------- Bharti Cellular Limited, New Delhi, India

« previous php.dev (#14699) next »