Jump to content

COOKIE HELP


chevys

Recommended Posts

I have a site that sets 2 cookies the first one is:

 

setcookie("trupimp",$user[2]);

 

The second is the following:

 

setcookie("trupimpn",$player[1]);

 

How do i format these 2 cookies to expire if the browser is ever closed?  Thanks to anyone that can assist me.

 

[Player1] inserts the cookie into the database table

[user2] inserts the cookie into another table on the database

Link to comment
Share on other sites

When you add:

 

time()+0

 

You have to attempt to log in several times so if you set it to 1 it will alow you to log in then if you close the browser you cannot log back in.

 

I guess it only makes it valid for 1 second.

 

Thanks, Guys

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.