title: Experimenting with encryption when storing passwords with PHP into MySQL
body: <p>I have been reading a few encrytption articles on encrypting passwords in PHP and they all seem to be pretty inconclusive with reader comments saying "this is stupid you should do it like this". I have been messing around with encryption and have come up with this bearing in mind i have been using php for a number of days so you could say im a noob :)</p>
  
  <pre><code>&lt;?php 
      $salt = uniqid(mt_rand(), true);
      $hashedPassword = sha1( $userPassword . $salt );
  ?&gt;
  </code></pre>