title: php if statement to match text to row value from mysql
body: <p>I've created a form so users can change their password, for some added security I want users to enter their old password before they can change it to the new one. I am having an issue with a simple if statement.</p>
  
  <pre><code>if ($row['password'] = $old_encrypt)
  </code></pre>
  
  <p>the password is md5 encrpyted, so I run the user inputted password through md5 before getting to this if statement.</p>
  
  <p>What I want to check is that the user inputted password is equal to the one stored in the database. The above code however will accept any value as equal to the one stored in the db...thus can someone enlighten me to what the issue may be?</p>
  
  <p>Thanks in advance </p>