title: PHP: Why does else-block not work?
body: <p>I have the following code:</p>
  
  <pre><code>&lt;form action="" method="POST"&gt;
      &lt;input id="delete" name="delete" placeholder="Name" type="text"&gt;&lt;/b&gt;
      &lt;input type="submit" name="deleteButton" value="Go!"&gt;
  &lt;/form&gt;
  
  &lt;?php
  if (isset($_POST['deleteButton'])) {
      $temp = $_POST['delete'];
      $deleteSQL = "DELETE FROM `berater` WHERE `Nachname` LIKE '$temp' OR `Vorname` LIKE '$temp' OR CONCAT(Vorname,' ', Nachname) LIKE '%$temp%'";
      $searchSQL = "SELECT FROM `berater` WHERE `Nachname` LIKE '$temp' OR `Vorname` LIKE '$temp' OR CONCAT(Vorname,' ', Nachname) LIKE '%$temp%'";
      $search = mysqli_query($db_link, $searchSQL);
      $loeschen = mysqli_query($db_link, $deleteSQL);
  
      if (!$search) {
          echo "Kein Datensatz gefunden!";
      } else {
          echo "$temp erfolgreich gelöscht.";
      }
  }
  </code></pre>
  
  <p>I am new to PHP and thought the <code>mysqli_query</code> returns <code>false</code> if the name is not found in the database. What am I doing wrong here?</p>