Create lasting php login cookie sessions

后端 未结 1 1206
悲&欢浪女
悲&欢浪女 2021-01-27 11:54

I\'m trying to make my login sessions last longer, so that people don\'t get logged out of my website too early. For example, making a blog post and losing it when they submit b

相关标签:
1条回答
  • 2021-01-27 12:46

    If you would like you could add this for when your cookie expires:

    time()+60*60*24*30
    

    This is like saying that the cookie expires in 60secs, 60mins, 24h and so on. You should also check out a tutorial on cookies here: http://www.w3schools.com/php/php_cookies.asp

    0 讨论(0)
提交回复
热议问题