PHP encrypt password before storing it to database
<p>I found the following example on php.net to secure password before storing it. However, I don't quite understand line 3. Could someone explain this a little bit?  Thanks!  </p>

<pre><code>1 &lt;?php
2 $password = crypt('mypassword'); // let the salt be automatically generated

3 if (crypt($user_input, $password) == $password) {
4   echo "Password verified!";
5 }
6 ?&gt;
</code></pre>
