title: Encrypt password before storing in database?
body: <p>I have a password being passed from my iPhone app to the database via a php script, user.php.</p>
  
  <p>The variable $pass is populated by the following:</p>
  
  <pre><code>$pass = str_replace("'", "", $_REQUEST['pass']);
  </code></pre>
  
  <p>How can I encrypt this before it's inserted into my database? I've read a little about the different techniques, but looking for the best way to manage this.</p>
  
  <p>Thanks to everyone.</p>