-1
Hello need that if there is no link in the link column of the table the button does not display, the code in xampp works but in the hosting is not going I do not know why, the button displays and has no link or is not to display the button. follow php
<?php
$dados1 = mysqli_query($conectar, "SELECT p.produto, p.link1 from clientes c
JOIN infos i
ON c.id = i.idcliente
JOIN produtos p
ON i.idproduto = p.id WHERE p.id='$id'");
$num1 = mysqli_fetch_object($dados1);
if ($num1 == 0):
else :
echo "<div class='pro-button2'>
<a href='$link1'>MediaFire</a>
</div><div style='float:left;'> </div>";
endif;
?>
if you have link = shows the button If no link = does not show the button
You must break the string
<a href='+"$link1+"'>MediaFire</a>
– MarceloBoni
So what I don’t understand is why he is echoing the button and in the column the value is NULL because there is no link in such id
– Dynamo