Jump to content

cookie


Ninjakreborn

Recommended Posts

setcookie("username", $username, PHP_INT_MAX);
setcookie("password", $password, PHP_INT_MAX);
those are returning errors and they were not before.  I am using cookies instead of sessions for 2 reasons, it's simply for 1 persons admin page, he wanted cookies, and i don't have php.ini access.  It use to accept that last parameter, to make it a permanent cookie, but now it's not.
Link to comment
Share on other sites

I said to hell with it, it worked,  then a few months later it stops working.  Server's were changes, so I got tired of it, I learnt a few new techniques about setting the domain name so I set that up this time, and changed that around and it works.  I think the php max int has something to do with the way php.ini is set, with that being the case, It is not something that is very safe.  ESPECIALLY if you are trying to write code that can go from server to server.  I have to figure out something.

[code]$expire = time() + (1000000*30);
setcookie("username", $username, $expire, "/administration/", ".funnyemailforwards.com",);
setcookie("password", $password, $expire, "/administration/", ".funnyemailforwards.com",);[/code]
Actually you can even take that 1 million mark and change that to 2-5 million or somethign I am unsure how much time that is, but it'll probably last quite a bit of the average humans lifespan, it's a simpler way to do it.
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.