Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 how to set a permenet cookie?
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Amailer




PostPosted: Fri Mar 05, 2004 6:47 pm   Post subject: how to set a permenet cookie?

hey, im using this:

code:

setcookie($cookiename . 'unique', serialize($client_ip), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);


and i was wondering how do i make it so that the cookie lasts even if you restart your browser/restart your computer?

With the code above it seems that when i quit my browser and start it up again the cookie is gone... :S
Sponsor
Sponsor
Sponsor
sponsor
Amailer




PostPosted: Fri Mar 05, 2004 7:26 pm   Post subject: (No subject)

NVM this problem is solved, but another one has come one.
this is what i do to update the hits...

if(!isset($HTTP_COOKIE_VARS['unique_hits']) ...


see if you go back to the site after you have closed the browser, the cookie is not set just yet unless you refresht he site page (or click another link), problem is that the if(!isset($HTTP_COOKIE_VARS['unique_hits']) works just when you go to the site.
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: