Jay Jay - 1 month ago 7
MySQL Question

PHP storing password in cookie

Is there a relatively secure way to store the password in the browser cookie (for remembering the login information) in the cookie without creating an extra column for hash in database?
Thanks.

Answer

Store a salted hash of the password in the cookie

$salt = 'snfcikkfbnvekrew';
$cookie_value = md5($salt . $password);