title: Button to delete table entry
body: <p>i would like a button to delete the table entry next to it. But I am coming up short. I seem to be typing something wrong here is my attempt:</p>
  
  <pre><code>&lt;td&gt;&lt;a href="delete-quote.php?id=&lt;?php echo $row['id'];?&gt;"&gt;&lt;button class="btn-danger-dark"&gt;Delete&lt;/button&gt;&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <p>but it doesn't seem to work. I only get the ELSE error message</p>
  
  <p>I have tried small changes but with no affect. Im pretty sure its something small that I am missing.</p>
  
  <p>my delete-quote.php code:</p>
  
  <pre><code>&lt;?php
  
  $id = $_GET['id'];
  //Connect DB
  // on success delete : redirect the page to original page
  $dbname = "siyakhat_ibroker";
  $conn = mysqli_connect("localhost", "siyakhat_root", "*****", $dbname);
  // Check connection
  if (!$conn) {
  die("Connection failed: " . mysqli_connect_error());
  }
  
  // sql to delete a record
  $sql = "DELETE FROM prerequest WHERE id = $id"; 
  
  if (mysqli_query($conn, $sql)) {
  mysqli_close($conn);
  header('Location: manage-quotes.php'); 
  exit;
  } else {
  echo "Error deleting record";
  }
  ?&gt;
  </code></pre>
  
  <p>UPDATE</p>
  
  <p>my dbconnect.php</p>
  
  <pre><code>&lt;?php
  
  $mysql_hostname ="localhost";
  $mysql_user ="siyakhat_root";
  $mysql_password ="****";
  $mysql_database ="siyakhat_ibroker";
  $prefix = "";
  $bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect database");
  mysql_select_db($mysql_database, $bd) or die("Could not select database");
  
  ?&gt;
  </code></pre>