I have a problem with a project made with PHP and MySQL. I want to delete a row from my document but I can't. It's very strange because when I click my button delete, he goes to index.php but it doesn't delete the row from the database.
if(isset($_POST['delete'])){
$sql = "DELETE FROM account WHERE idAccount = '".$id."'";
$result = $conn->query($sql);
header("location: index.php");
}