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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.