I need to put a product message unavailable on my system, which takes the available status of the db (YES or NO) I did an IF that changes the image of the product when the status is NAO but I want a message if the user clicks on it saying that the same is unavailable ..
The products are pulled as a list of the bank and everyone already has a confirmation alert when a user clicks, but I need them to change the message if the item is unavailable
Here's what I have: Display the products like this:
<a href="cadastra.php?cod=<?php echo $id_pro ?>&nome=<?php echo $nomepro ?>&preco=<?php echo $precopro ?> class="btn twitter" onclick="return confirm('<?php echo $nomepro ?> - CONFIRMA O PEDIDO?')">
<h3 class="heading-title"><?php echo $nomepro ?>  R$<?php echo $precopro ?></h3> </a>
The IF that changes the image when unavailable is like this:
$sqlp = mysql_query("SELECT * FROM produtos WHERE id_categoria='11'");
while($verp = mysql_fetch_array($sqlp)){
$disponivel = $verp['disponivel'];
$id_pro = $verp['cod'];
$nomepro = $verp['nome'];
$descpro = $verp['descricao'];
$precopro = $verp['preco'];
if($disponivel == SIM){
$img = "../imagens/disponivel.png";
}else{
$img = "../imagens/indisponivel.png";
}
I'm using jquery (without knowing) if anyone has any ideas, Thanks!