PHP - Is it secure way to store password in cookie?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5232908/php-storing-password-in-cookie">PHP storing password in cookie</a>  </p>
</blockquote>



<p>In a login system, if a user want to stay logged in, then the password needs to be stored in the browser cookie. I have been gone through many previous questions on SO, and found out  that its not any secure to store the password in the browser cookie. I wonder if I do sth like</p>

<pre><code>$string = 'snfcikkfbnvekrew';
    $salt = md5($passwrod.$string); 
    $password = md5(sha1(md5("$salt$string$salt")));  //or some other random sequence of encryption functions
</code></pre>

<p>I'm just curious to learn what kind of attacks can be performed if someone accesses the cookie? </p>
