Jump to content

Trouble setting more than one cookie


SCook

Recommended Posts

There is no error, per se, it just doesn't seem to be creating the cookie.  The code to make it is:

 

setcookie("default", $var, time() * 60 * 60 * 60 * 365);

 

It's the same that I use to create another cookie, which works fine.  I did see something on a google search about a php bug regarding multiple cookies, but it was a membership site and I don't want to sign up.  Anyway, when I output the cookie, or break the variable up into an array, nothing is there.  But I'm getting no error at all.

Maybe you have a structure error in  your script and the code isn't ever reaching the point where it sets the cookie?

 

Are both of your cookies registered in the same spot of your script?

 

Post part of your code so we can see if we can find anything that could possibly causing the problem.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.