I'm trying to remove an item from the database, but it is not removing it.
<form action="removelicita.php" method="post">
<input type="hidden" name="id" value="<?=$licitacao['id']?>">
<button type="button" class="btn btn-danger">Remover</button>
</form>
Above the code snippet where I call the delete action. Below the exclusion code:
<?php
require_once("conexao.php");
$id = $_POST["id"];
$query = "delete from insereLicitacao where id = $id";
if(mysqli_query($conexao,$query)){
header("Location: listalicitacao.php");
die();
} else {
echo "Erro ao remover licitação";
}