title: My password validation is not case sensitive
body: <p>It is a login form with only username and password. It works well but i want my information to be case sensitive. For example my database username is : David and password :PooPoo. Although if i insert user name: daVid and password: PoOPOo it parse the form.</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>&lt;?php 
      session_start();
      if (isset($_SESSION["manager"])) {
          header("location: index.php"); 
          exit();
      }
  ?&gt;
  &lt;?php 
      if (isset($_POST["username"]) &amp;&amp; isset($_POST["password"])) {
  
          $manager = preg_replace('#[^A-Za-z0-9]#i', '', $_POST["username"]); 
          $password = preg_replace('#[^A-Za-z0-9]#i', '', $_POST["password"]); 
          include "../storescripts/connect_to_mysql.php"; 
          $sql = mysql_query("SELECT id FROM admin WHERE username='$manager' AND password='$password' LIMIT 1"); // query the person
          $existCount = mysql_num_rows($sql); // count the row nums
  
          if ($existCount == 1) { // evaluate the count
               while($row = mysql_fetch_array($sql)){ 
                   $id = $row["id"];
               }
               $_SESSION["id"] = $id;
               $_SESSION["manager"] = $manager;
               $_SESSION["password"] = $password;
               header("location: index.php");
               exit();     
          }else{
              print '&lt;script type="text/javascript"&gt;'; 
              print 'alert("wrong info")'; 
              print '&lt;/script&gt;'; 
          }            
      }
  ?&gt; 
  </code></pre>
  
  <p>My validation script</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt; 
      function validateMyForm ( ) { 
          var isValid = true;
          if ( document.adminlogin.username.value == "" ) { 
              alert ( "Please enter your username" ); 
              isValid = false;
          } else if ( document.adminlogin.password.value == "" ) { 
              alert ( "Please enter password" ); 
              isValid = false;            
          }
          return isValid;
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Where is my error please?</p>