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.
You can come back in days and you're still logged in. How does this work?
I'm working with session_start(); and storing the user data for example in
$_SESSION['user']['id'] = 40;
How do I change this code so that my user can stay logged in until they decide to log out?