title: Check for a null value from a database -- failing
body: <p>I am retrieving 3 fields from a database, and by default, only the username field will have content. The other information will be added in from a user application. I want to show the field as "No Info" if there is no entry in the field. I am trying to use both empty() and is_null() to no avail. A var_dump of $row['firstname'] and $row['lastname'] returns NULL in both cases.</p>
  
  <pre><code>&lt;?php
    if (isset($_GET["subcat"]))
    $subcat = $_GET["subcat"];
  if (isset($_GET["searchstring"])) {
      $searchstring = $_GET["searchstring"];
  }
  $con = mysqli_connect("localhost","user","password", "database");
  if (!$con) {
      echo "Can't connect to MySQL Server. Errorcode: %s\n". mysqli_connect_error();
      exit;
  }
  $table = 'USERS';
  $brand = '%' . $searchstring . '%';
  $rows = getRowsByArticleSearch($brand, $table);
  echo "&lt;table border='0' width='100%'&gt;&lt;tr&gt;" . "\n";
  echo "&lt;td width='15%'&gt;Username&lt;/td&gt;" . "\n";
  echo "&lt;td width='15%'&gt;Firstname&lt;/td&gt;" . "\n";
  echo "&lt;td width='15%'&gt;Surname&lt;/td&gt;" . "\n";
  echo "&lt;/tr&gt;\n";
  foreach ($rows as $row) {
      if (is_null($row['firstname']) || $row['firstname'] == "") {
          $row['firstname'] == "No Info";
      }
      if ($row['lastname'] == null || $row['lastname'] == "") {
          $row['firstname'] == "No Info";
      }
      var_dump($row['firstname']);
      var_dump($row['lastname']);
      echo '&lt;tr&gt;' . "\n";
      echo '&lt;td&gt;&lt;a href="#" onclick="updateByUser(\''. $row['username'] .'\',\''.$subcat.'\')"&gt;'.$row['username'].'&lt;/a&gt;&lt;/td&gt;' . "\n";
      echo '&lt;td&gt;&lt;a href="#" onclick="updateByUser(\''. $row['username'] .'\', \''.$subcat.'\')"&gt;'.$row['firstname'].'&lt;/a&gt;&lt;/td&gt;' . "\n";
      echo '&lt;td&gt;&lt;a href="#" onclick="updateByUser(\''. $row['username'] .'\', \''.$subcat.'\')"&gt;'.$row['lastname'].'&lt;/a&gt;&lt;/td&gt;' . "\n";
      echo '&lt;/tr&gt;' . "\n";
  }
  echo "&lt;/table&gt;\n";
  function getRowsByArticleSearch($searchString, $table) {
      $con = mysqli_connect("localhost","user","password", "database");
      $recordsQuery = "SELECT username, firstname, lastname FROM $table WHERE lower(username) LIKE ? ";
      if ($getRecords = $con-&gt;prepare($recordsQuery)) {
          $getRecords-&gt;bind_param("s", $searchString);
          $getRecords-&gt;execute();
          $getRecords-&gt;bind_result($username, $firstname, $lastname);
          $rows = array();
          while ($getRecords-&gt;fetch()) {
              $row = array(
                              'username' =&gt; $username,
                              'firstname' =&gt; $firstname,
                              'lastname' =&gt; $lastname,
                          );
              $rows[] = $row;
          }
          return $rows;
      } else {
          print_r($con-&gt;error);
      }
  }
  </code></pre>