I'm having a problem with my cookies. It was working perfectly and then my boss asked me to add a few things so I added them to the cookie. Once I added the 11 new 1/0 (tinyint datatype) items my cookie started dropping the items it stored in the cookie first. I tried changing the cookie name for just the 11 items so it would be in a different cookie but it does the same thing. Here's my code, everything after testcookie[admin] was one of the 11 added.
The cookie file is only 2kb and I'm using IE 5.5. It's under the 4kb max size but I don't know if there's a maximum character limit on a cookie or if there's something else going on. I don't know if I have a php issue, browser issue or it's the cookie. Any suggestions?
Code:
setcookie("testcookie[userid]","$userid",time()+315360000);
setcookie("testcookie[fname]","$fname",time()+315360000);
setcookie("testcookie[lname]","$lname",time()+315360000);
setcookie("testcookie[email]","$email",time()+315360000);
setcookie("testcookie[tt]","$tt",time()+315360000);
setcookie("testcookie[news]","$news",time()+315360000);
setcookie("testcookie[dm]","$dm",time()+315360000);
setcookie("testcookie[calendar]","$calendar",time()+315360000);
setcookie("testcookie[whitepapers]","$whitepapers",time()+315360000);
setcookie("testcookie[subscriptions]","$subscriptions",time()+315360000);
setcookie("testcookie[phone]","$phone",time()+315360000);
setcookie("testcookie[mac]","$mac",time()+315360000);
setcookie("testcookie[dept]","$dept",time()+315360000);
setcookie("testcookie[yearsexp]","$yearsexp",time()+315360000);
setcookie("testcookie[levelexp]","$levelexp",time()+315360000);
setcookie("testcookie[crm]","$crm",time()+315360000);
setcookie("testcookie[login]","yes",time()+315360000);
setcookie("testcookie[admin]","$admin",time()+315360000);
setcookie("testcookie2[base_sas]","$base_sas",time()+315360000);
setcookie("testcookie2[sas_stat]","$sas_stat",time()+315360000);
setcookie("testcookie2[sas_eg]","$sas_eg",time()+315360000);
setcookie("testcookie2[sas_eis]","$sas_eis",time()+315360000);
setcookie("testcookie2[sas_af]","$sas_af",time()+315360000);
setcookie("testcookie2[sas_intrnet]","$sas_intrnet",time()+315360000);
setcookie("testcookie2[sas_mddb]","$sas_mddb",time()+315360000);
setcookie("testcookie2[sas_eminer]","$sas_eminer",time()+315360000);
setcookie("testcookie2[sas_ets]","$sas_ets",time()+315360000);
setcookie("testcookie2[sas_graph]","$sas_graph",time()+315360000);
setcookie("testcookie2[sas_connect]","$sas_connect",time()+315360000);
The cookie file is only 2kb and I'm using IE 5.5. It's under the 4kb max size but I don't know if there's a maximum character limit on a cookie or if there's something else going on. I don't know if I have a php issue, browser issue or it's the cookie. Any suggestions?