title: PHP Script won't recognise email
body: <p>I'm getting pretty far with my registration script now. This has been such an amazing learning curve for me. As of now I've just finished up some bugs with my user recognition and registration email send outs. I'm having some issues with recovering a password though. At the moment I am just trying to get an email recognised, here is my HTML and PHP:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;?php
      session_start();    
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;link rel="stylesheet" type="text/css" href="style.css" /&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
  
          &lt;?php include "header.php" ?&gt;
          &lt;div id="wrapper"&gt;
  
               &lt;form method="post" action=""&gt;
               &lt;h2&gt;Recover Password&lt;/h2&gt;
               &lt;div id="underline"&gt;&lt;/div&gt;
                   &lt;ul&gt;
                       &lt;li&gt;
                           &lt;label for="usn"&gt;Email : &lt;/label&gt;
                           &lt;input type="text" maxlength="30" required autofocus name="reset" /&gt;
                       &lt;/li&gt;
                       &lt;li class="buttons"&gt;
                           &lt;input type="submit" name="reset" value="Reset Pass" class="xbutton" /&gt;
                       &lt;/li&gt;
                   &lt;/ul&gt;
               &lt;/form&gt;        
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  
  &lt;?php include "prec.php" ?&gt;
  </code></pre>
  
  <p>PHP</p>
  
  <pre><code>&lt;?php 
  if($_POST)
  {
  
          if(empty($_POST['reset'])) 
          {
              echo 'Please enter all fields';
          }
          else
          {
              $email = $_POST['reset'];
              $password = $_POST['password'];
  
              $db_name = 
              $db_user = 
              $db_pass = 
  
              $conn = new PDO('mysql:host=localhost;dbname=tweezy_php', 'tweezy_php', 'XXXXXX', 
                  array( PDO::ATTR_PERSISTENT =&gt; true ));
  
              $stmt = $conn-&gt;prepare("SELECT email FROM users WHERE email = ? ");
              $stmt-&gt;execute(array($email));
              if($stmt-&gt;rowCount() === 1 )
              {
                  echo "That email exists";
              }
              else
              {
                  echo "Sorry, that email doesn't exsist.";
              }
  
          }
      }
  ?&gt;
  </code></pre>
  
  <p>For some reason, no matter what I enter the supplied email is never recognised. Looking through my code I don't quite see why though. I've tried a couple of variations, but it just seems to give me the same result. I'm thinking it has something to do with my SQL query, but I can't seem to quite put my finger on it.</p>
  
  <p>Any insights would be wonderful!</p>