Cookie problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to use PHP to set a cookie to recognize people returning within a month. However no matter how i use the code, no cookie is being set. I've been in touch with my host, who assures me that cookies function in the 'normal' way on their servers, so its probably something wrong with my code. I'm using this:

$time = mktime()+(60*60*24*30); 
setcookie('lifevision', $dist_id, $time, '/', 'www.dono.co.uk','0');

i've also tried without the "www" and without the "www." in the domain. To test if the cookie is being set, the url www.dono.co.uk/testing/ should set a cookie. It also starts a session for people who can't accept cookies. (i've also put a print_r at the end of the page to print the cookie contents, if any) However the cookie just isnt appearing. Any suggestions appreciated,

Don

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux