3
I’m trying to remove an item from the database, but I’m 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 exclusion 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";
}
Gives any error ? Or only shows "error while removing bidding" ?
– Leandro Lima
Yeah, here’s the thing, it doesn’t make a mistake and it doesn’t show the message
– P Ribeiro