title: Can't delete rows from database
body: <p>I  want to delete some rows from my table. But when I click delete, this just show me a blank page. I'm sure about id value and my db connection.</p>
  
  <p>This is my code:</p>
  
  <pre><code>// connect to the database
  include('connect-db.php');
  
  // confirm that the 'id' variable has been set
  if (isset($_GET['id']) &amp;&amp; is_numeric($_GET['id'])) {
      // get the 'id' variable from the URL
      $id = $_GET['id'];
  
      // delete record from database
      if ($stmt = $mysqli-&gt;prepare("DELETE FROM my_table WHERE id = ? LIMIT 1")) {
          $stmt-&gt;bind_param("i",$id);
          $stmt-&gt;execute();
          $stmt-&gt;close();
      } else {
          echo "ERROR: could not prepare SQL statement.";
      }
      $mysqli-&gt;close();
  
      // redirect user after delete is successful
      header("Location: Dashboard.php");
  } else {
      // if the 'id' variable isn't set, redirect the user
      header("Location: Dashboard.php");
  }
  </code></pre>