PHP Cookies problem... cookie working on one page but not working on another -


hi can explain me:

on 1 page have:

setcookie(cookiename,$cookiedata,time()+(84600*30*24)); setcookie(cookiename2,$cookie2data, time()+(84600*30*24)); 

if on same page say:

echo $_cookie['cookiename'];  

it works fine....

but if go page few clicks onwards, , say:

echo $_cookie['cookiename']; 

nothing appears. why happen? cookie deleted in way?

oh , if try on page in between, same problem occurs.... i'm stumped,

thanks in advance, niall

are different pages on same domain? should setting path, have found cases when path not set '/' not accessible default 'everywhere' on site though make sense default.

try setting path of cookie.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -