title: Designing a secure auto login cookie system in PHP
body: <p>I want to have an auto login option check for a user. Basically that means a cookie will be stored on the client side.</p>
  
  <p>Now the question is, how do I make it secure so the cookie will can not be spoofed/modified.</p>
  
  <p>One of my friends suggest having a db table that stores the session_id, user's ip, browser info, etc and then compare it all that information once a user goes to the website again.</p>
  
  <p>I feel like having a separate table for that is a bit too much trouble. Is there another way to do it? Maybe with tokens or something like that?</p>