Thanks, Chris. I tried this; no dice. On 8/14/06, Chris <dmagick@xxxxxxxxx> wrote:
Andrew Darby wrote: > Hello, all. This is more of a php problem, but i'm not on the general > list and um the cookie problem is part of a php/mysql application . . > . . > > So, I have an application where university faculty can enter their > publications in a "scholarly database", but this data can also be > entered by a proxy (i.e., grad student or secretary). I have a number > of cookies that I set and then kill again when someone hits the logout > button: > > setcookie ('becool', '', time() - 86400); > setcookie ('user_id', '', time() - 86400); > setcookie ('andyouare', '', time() - 86400); > setcookie ('supereditor', '', time() - 86400); > setcookie ('now_editing', '', time() - 86400); > header('Location: index.php?type=logout'); > > (the user_id is the id of the person who logged in (through LDAP), the > now_editing is the id of the person whose records are being edited > (i.e., staff member #19 is the user, but they're editing faculty > member #34's work).) > > When I look at the cookies on the page they're redirected to (through > the firefox web developer extension), they're all gone. And the > becool cookie is definitely unset (or else you'd be able to visit > pages that require authentication). But when someone logs back in, > and I do my check to see if the person logged in is acting as > themselves or on the behalf of someone, the cookie is magically set to > the last person that had now_editing set. If the browser window is > killed, however, the cookie really is killed. If you're using IE it could be related to this issue: http://marc.theaimsgroup.com/?l=php-general&m=111396707507122&w=2 Try adding a path to the end even if it's just '/'. setcookie ('now_editing', '', time() - 86400, '/'); -- Postgresql & php tutorials http://www.designmagick.com/
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php