title: Codeigniter strange encryption of password
body: <p>I'm new to Codeigniter and trying to make a user registration. And I've met strange thing. At first I'll tell what exactly I'm doing with my password value:</p>
  
  <pre><code>$password = stripslashes($password);
  $password = htmlspecialchars($password);
  $password = md5($password);
  $password = strrev($password);
  </code></pre>
  
  <p>And then I'm saving it to the DB:</p>
  
  <pre><code>$data = array(
      'email'     =&gt; $email,
      'reg_type'  =&gt; $reg_type,
      'password'  =&gt; $password
  );
  
  $this-&gt;CI-&gt;db-&gt;insert('user', $data);
  </code></pre>
  
  <p>And no matter what password I enter, It's always saving this value: <code>e7248fce8990089e402b00f89dc8d14d</code></p>
  
  <p>And when I'm going to login page (code of encryption is the same), it's returning me a different md5 values (and it's look like correct).</p>
  
  <p>Can somebody explain why it's happens and how to solve it? Or maybe you can propose some another method of password's encryption.</p>
  
  <p>Thank you. </p>