//including the database connection file include("config.php"); //getting id of the data from url $SSPNumber = $_GET['SSPNumber']; //deleting the row from table $result = mysqli_query($mysqli, "DELETE FROM members WHERE SSPNumber=$SSPNumber"); //redirecting to the display page (index.php in our case) header("Location:index2.php");