in reply to no results while checking if cookie exists

it is not checking the part of 'if($cookie)' exists

You're not assigning anything to the $cookie variable, before you test it in the if...

See To retrieve a cookie, ...

Replies are listed 'Best First'.
Re^2: no results while checking if cookie exists
by sugoo (Initiate) on Mar 02, 2012 at 09:32 UTC

    oopsy, corrected it. thank you for your time.

    In between, my cookie is not expiring within the time frame given.

      the expire value is not working out and value is not expiring on its own. to ensure code is right, i tried loading after clearing browser cache. works as expected.