hice un if pero no me sale el boton por que no me sale este es el codigo:
Código PHP:
<?php
$consulta="select Estado from amigos where id_amigo='$reg[id]' and id_logueado='$id_usuario'";
$ejecuta=mysql_query($consulta) or die("Problemas en el select:".mysql_error());
$cantidad=mysql_num_rows($ejecuta);
while($cons=mysql_fetch_array($ejecuta))
{
if($cantidad=="0")
{
echo '<div class="amigos">
<form action="agregara.php" method="post">
<input type="hidden" name="id" value="'.$reg['id'].'">
<input type="submit" value="Agregar Amigos">
</form>
</div>';
}
else
{
echo "Ya enviaste la solicitud";
}
}
?>
Gracias lo otro ya funciona era la comilla jeje.