Remember me option allow the user to automatically get logged in to the website without entering its username and password again.
To do this I am using $_COOKIE which store value on the client side for detecting the user. Next time when the user come it will automatically redirect to the homepage.
Encrypt the value before storing it in $_COOKIE and decrypt it while access. It will automatically destroy after 30 days.