I am building a login system for my website, however I have always used the $_SESSION variable before for remembering people logged in, but this time they need to be remembered via cookies. The cookie will store their username and security code which I will also store in a database allowing me to confirm that they are the correct user. I have seen various approaches to this, however I would like to generate a completely secure string.
Share
$_SESSIONalready uses cookies by default, so you don’t have to change anything. Just make sure theuse_cookiesanduse_only_cookiesconfiguration options are set to on.