<?php 
include "conn.php";
$id=$_GET['id'];

// sql to delete a record
$sql = "DELETE FROM tbl_vendor WHERE id='$id'";

if (mysqli_query($conn, $sql)) {
  echo "Record deleted successfully";
} else {
  echo "Error deleting record: " . $conn->error;
}
$conn->close();
header('location:users-list.php');
?>