title: PHP -> function calls break page
body: <p>I've been trying to setup a login page with PHP and MySQL, and I'm running into an issue when I use prepared statements with the -> operator. I have php5 and apache2 installed correctly, and <code>phpinfo();</code> runs with no problem, but when I use this code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;title&gt;Login&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form action="" method="POST"&gt;
              &lt;label for="username"&gt;Username:&lt;/label&gt;
              &lt;br /&gt;
              &lt;input type="text" name="username" id="username" /&gt;
              &lt;br /&gt;
              &lt;label for="password"&gt;Password:&lt;/label&gt;
              &lt;br /&gt;
              &lt;input type="password" name="password" id="password" /&gt;
              &lt;br /&gt;
              &lt;input type="submit" value="Submit" /&gt;
          &lt;/form&gt;
          &lt;?php 
              error_reporting(-1);
              ini_set('display_errors', 'On');
  
              if (isset($_POST['username']) &amp;&amp; isset($_POST['password'])) {
                  $logged_in = false;
  
                  $username = $_POST['username'];
                  $password = $_POST['password'];
  
                  $conn = new mysqli('localhost', 'root', 'password', 'db');
  
                  /* create a prepared statement */
                  if ($stmt = $conn-&gt;prepare("SELECT username, password, salt FROM `users` WHERE `username` = ?")) {
  
                      /* bind parameters for markers */
                      $stmt-&gt;bind_param("s", $username);
  
                      /* execute query */
                      $stmt-&gt;execute();
  
                      $stmt-&gt;bind_result($storedUser, $storedPassword, $storedSalt);
  
                      while ($stmt-&gt;fetch()) {
                          // $storedUser, $storedPassword, $storedSalt
                          if (crypt($password, $storedSalt) == $storedPassword) {
                              $logged_in = true;
                          }
                      }
  
                      /* close statement */
                      $stmt-&gt;close();
  
                      if ($logged_in === true) {
                          echo 'Successfully logged in as ' . $username;
                      }
                  }
              }
  
          ?&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>the php breaks at the > and the rest is displayed to the page.</p>
  
  <pre><code>prepare("SELECT username, password, salt FROM `users` WHERE `username` = ?")) { /* bind parameters for markers */ $stmt-&gt;bind_param("s", $username); /* execute query */ $stmt-&gt;execute(); $stmt-&gt;bind_result($storedUser, $storedPassword, $storedSalt); while ($stmt-&gt;fetch()) { // $storedUser, $storedPassword, $storedSalt if (crypt($password, $storedSalt) == $storedPassword) { $logged_in = true; } } /* close statement */ $stmt-&gt;close(); if ($logged_in === true) { echo 'Successfully logged in as ' . $username; } } } ?&gt; 
  </code></pre>