title: unlimited time for a login/session?
body: <p>On some sites, like facebook, gmail, youtube, etc, you can tick this option (or it's like that by default) to be logged in infinitely, until you logout.</p>
  
  <p>You can come back in days and you're still logged in. How does this work?</p>
  
  <p>I'm working with <code>session_start();</code> and storing the user data for example in </p>
  
  <p><code>$_SESSION['user']['id'] = 40;</code></p>
  
  <p>How do I change this code so that my user can stay logged in until they decide to log out?</p>