I'm having a question in the condition I'm trying to put on my system. If the% of the owner of the ad is equal to that of the session, a "accept negotiation" button will appear, otherwise the "Product on the go" button will appear. When testing, only the "Accept negotiation" button will appear.
Follow the code:
<?php
$id_usuario_anuncio = $_GET["ID_usuario"];
$id_usuario_sessao = $_SESSION["id"];
if($id_usuario_anuncio == $id_usuario_sessao)
{
echo '<form method="post" action="">
<input type="hidden" name="ATIVAR/EXCLUIR" value="<?php echo $_GET["ID"]; ?>">
<div class="panel-footer">
<button type="submit" name="ativar" id="ativar" value="ATIVAR"class="botao_cardapio">Aceitar negocição</button>
</div>
</form>';
}
else
{
echo '<form method="post" action="">
<input type="hidden" name="ATIVAR/EXCLUIR" value="<?php echo $_GET["ID"]; ?>">
<div class="panel-footer">
<button type="submit" name="excluir" id="excluir" value="EXCLUIR"class="botao_cardapio">Produto a caminho</button>
</div>
</form>';
}
?>