plutomed Posted August 19, 2007 Share Posted August 19, 2007 Is there a way to set cookies forever of do you just set them for a very long time? Link to comment https://forums.phpfreaks.com/topic/65683-solved-setting-cookies/ Share on other sites More sharing options...
MadTechie Posted August 19, 2007 Share Posted August 19, 2007 only a long time Link to comment https://forums.phpfreaks.com/topic/65683-solved-setting-cookies/#findComment-328030 Share on other sites More sharing options...
plutomed Posted August 19, 2007 Author Share Posted August 19, 2007 Oh ok thanx Link to comment https://forums.phpfreaks.com/topic/65683-solved-setting-cookies/#findComment-328031 Share on other sites More sharing options...
MadTechie Posted August 19, 2007 Share Posted August 19, 2007 as a note: setcookie('k',$k+1,time()-1); setting the expire time to 0 makes it a browser session cookie, lasting forever, until the browser is closed. but setting the expire time to 1 is the lowest timestamp possible and is most likely to expire the cookie without any problems. Link to comment https://forums.phpfreaks.com/topic/65683-solved-setting-cookies/#findComment-328032 Share on other sites More sharing options...
plutomed Posted August 19, 2007 Author Share Posted August 19, 2007 Well I'm setting cookies for a login system so that will not work but thanx anyway Link to comment https://forums.phpfreaks.com/topic/65683-solved-setting-cookies/#findComment-328035 Share on other sites More sharing options...
MadTechie Posted August 19, 2007 Share Posted August 19, 2007 be carefull of security risks Link to comment https://forums.phpfreaks.com/topic/65683-solved-setting-cookies/#findComment-328063 Share on other sites More sharing options...
plutomed Posted August 19, 2007 Author Share Posted August 19, 2007 Yes, well I could md5(); the pass and uname but the uname is not encrypted in the db so would I still be able to md5 it and decrypt when it pulls it drom the db? Link to comment https://forums.phpfreaks.com/topic/65683-solved-setting-cookies/#findComment-328073 Share on other sites More sharing options...
MadTechie Posted August 19, 2007 Share Posted August 19, 2007 OK .. thats doesn't make much sense to me, MD5 can't be "decrypted" storing the username for use on the login screen is fine.. password well a litte 2way encryption is always an idea but that can be reversed. simple idea.. would be to store the hashed password and on the login if the password is 32 char then don't MD5 it.. your have to put a password limit of 31 chars.. just an idea personally i wouldn't store the password in any format in a cookie anyways thats for another thread lol Link to comment https://forums.phpfreaks.com/topic/65683-solved-setting-cookies/#findComment-328076 Share on other sites More sharing options...
plutomed Posted August 19, 2007 Author Share Posted August 19, 2007 Yes ok, so....ok Link to comment https://forums.phpfreaks.com/topic/65683-solved-setting-cookies/#findComment-328077 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.