title: Trying to output a mysql database in php
body: <p>I'm trying to test outputting data from a database table using phpmyadmin in php. For some reason it isn't working though, no errors involved.  What am I doing wrong here?  </p>
  
  <p>Here is a picture of my database:</p>
  
  <p><a href="https://i.imgur.com/Rd2aeBA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xa27Y.png" alt="database"></a></p>
  
  <p>Note: This database is filled with fake information, no real e-mail addresses are used.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    &lt;?php
  
      include "cs234DbConnect.inc.php";
  
      $dbc =  mysqli_connect(DBHOST, DBUSER, DBPWD, DBNAME);
      $error = mysqli_connect_error();
      if($error != null){
          $output= "&lt;p&gt; Unable to connect to database&lt;p&gt;" . $error;
          exit($output);
      }
  
  
      $query = mysqli_query($dbc, "SELECT * FROM site7_customers WHERE FirstName = 'Leonie'") or die(mysqli_error($dbc));
  
      while($rows = mysqli_fetch_array($query)){
          $FirstName = $rows['FirstName'];
          $LastName = $rows['LastName'];
          $Email = $rows['Email']
  
  
          echo "$FirstName $LastName&lt;br&gt;$Email&lt;br&gt;&lt;br&gt;";
  
      }
      mysqli_close($dbc);
  
  
      ?&gt;
  </code></pre>
  
  <p>Here is how I'm connecting:</p>
  
  <pre><code>&lt;?php
      /* File: cs234DbConnect.inc.php
      */
      define('DBNAME', 'mtingle');
      define('DBHOST', 'localhost');
      define('DBUSER', 'mtingle');
      define('DBPWD'', 'mypassword');
  
      define('DBCONN', 'mysql:host=' . DBHOST . ';dbname=' . DBNAME);
      ?&gt;
  </code></pre>
  
  <p>Thank you in advance.</p>