title: basic mysql sha1 password valid check
body: <p>I am using sha1 function to store my password in mysql DB.. </p>
  
  <pre><code>$passwordHash = sha1($password);
  </code></pre>
  
  <p>From google I got this
  From user registration</p>
  
  <pre><code>sha1( sha1(users_plaintext_password)+random string )
  </code></pre>
  
  <p>To check </p>
  
  <pre><code>server computes sha1( users_hashed_password_in_database +
  $_SESSION['random_string'] )
  
  if $_POST['password'] ==
  sha1( users_hashed_password_in_database + $_SESSION['random_string'] )
  </code></pre>
  
  <p>My question is how do I check for validation?Is this the correct method?? And does using some random string as salt give my password more protection??</p>