I'm trying to delete some data from a table in a mysqli database, and I receive that error. I tried with isset, writing it directly without using a variable, nothing works. What am I doing wrong?
<?php
echo"hello";
$link = mysqli_connect("localhost", "root", "", "documents");
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$ID = $_POST['id'];
$result = mysqli_query($link, "DELETE FROM document WHERE id='$ID'");
header("Location: connect-db.php");
?>