Hi all, and thanks for all your kind hel. I found the problem although I don't know what was causing it. I simply moved the setcookie() function to another page (standalone to say) and it worked perfectly... my "Cookies" folder started to show/delete the cookie on each request, and also the site could make use of it with no problem. Why you ask? I don't know. I remember reading a long time ago that in some cases the code was read by the server from the bottom up in some case, but I don't know if this is the case... There was NOTHING that altered the setcookie() function above it.
Cesar Aracena "Chris Shiflett" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > --- Cesar Aracena <[EMAIL PROTECTED]> wrote: > > I have the following code to first start a session and then write a > > cookie... is that so hard? > > Not hard at all. However, when trying to identify a problem, it is much > easier to try to isolate it. Forget the session, and see if you can set a > cookie: > > <? header('Set-Cookie: foo=bar'); ?> > > Try to read it on another page: > > <? echo $_COOKIE['foo']; ?> > > If that works, slowly modify it until it is identical to the code in > question, testing after each step. > > Also, make sure the URL you are spcifying in the Location header is an > absolute URL. And, if you are on IIS, the Location header (and response > status code change) might be what is causing the problem, as IIS has a > known bug related to this. > > Hope that helps. > > Chris > > ===== > Chris Shiflett - http://shiflett.org/ > > PHP Security Handbook > Coming mid-2004 > HTTP Developer's Handbook > http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php