title: PHP Login Form - MySQL Database - Invalid Password
body: <p>I'm trying to login with this code, however I always get a negative when I try it ($errorMessage). I'm basicly trying to check the Username and Password to an existing database of <em>vanilla forums</em>. I got a User with only SELECT (read) access to the specific TABLE.
  I don't get what exactly this line does:</p>
  
  <blockquote>
    <p>prepare("SELECT * FROM GDN_User WHERE Email = :Email")</p>
  </blockquote>
  
  <p>I have these ROWS in my Database:</p>
  
  <blockquote>
    <p>UserID, Email, Password, (Name) (and more unrelevant ones)</p>
  </blockquote>
  
  <pre><code>&lt;?php
  //username-, password-vars (etc.) removed for stackoverflow post
  //LOGIN START
  session_start();
  $pdo = new PDO('mysql:host=localhost;dbname=vanilla_forums', $username2, $password);
  if(isset($_GET['Login'])) {
      $email = $_POST['Email'];
      $passwort = $_POST['Passwort'];
  
      $statement = $pdo-&gt;prepare("SELECT * FROM GDN_User WHERE Email = :Email");
      $result = $statement-&gt;execute(array('Email' =&gt; $email));
      $user = $statement-&gt;fetch();
  
      //Überprüfung des Passworts
      if ($user !== false &amp;&amp; password_verify($passwort, $user['Passwort'])) {
          $_SESSION['UserID'] = $user['UserID'];
          die('Login erfolgreich. Weiter zu &lt;a href="access.php"&gt;internen Bereich&lt;/a&gt;');
      } else {
          $errorMessage = "Password invalid.&lt;br&gt;";
      }
  }
  
  //LOGIN END
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Login&lt;/title&gt;    
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;?php
  if(isset($errorMessage)) {
      echo $errorMessage;
  }
  ?&gt;
  
  &lt;form action="?Login=1" method="post"&gt;
  E-Mail:&lt;br&gt;
  &lt;input type="email" size="40" maxlength="250" name="Email"&gt;&lt;br&gt;&lt;br&gt;
  
  Dein Passwort:&lt;br&gt;
  &lt;input type="password" size="40"  maxlength="250" name="Passwort"&gt;&lt;br&gt;
  
  &lt;input type="submit" value="Abschicken"&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It is possible that I simply did something wrong with Capped letters, however can't find the issue.</p>