Password encryption Codeigniter
<p>Hi I'm trying to make my login form to work but no luck so far. I need to use the encrypt class in order to retrieve the password later at my edit form. I already tested the encode and decode seem to work fine but I just cannot login. When I tested it with the md5 function I could login properly so the problem must be somewhere in the model. Please any ideas?</p>

<pre><code>function validate(){
$this-&gt;db-&gt;from('users')-&gt;where('username', $this-&gt;input-&gt;post('username'));
$query = $this-&gt;db-&gt;get();
$rows = $query-&gt;row();
$password = $this-&gt;input-&gt;post('password');
 if($query-&gt;num_rows == 1){
if ($this-&gt;encrypt-&gt;decode($rows-&gt;password) === $password ) {
return true;
}}
}
</code></pre>
