mira lo he puesto asi estaría bien:
Código PHP:
<?php
$consulta=mysql_query("select Estado from amigos where id_amigo='$reg[id]' and id_logueado='$id_usuario'", $conexion)or
die("Problemas en el select:".mysql_error());
$i=0;
while($cons=mysql_fetch_assoc($consulta))
{
echo $cons['Estado'];
if($cons['Estado']=="pendiente")
{
echo "espere a que te acepten";
}
else
{ ?>
<div class="amigos"><form action="agregara.php" method="post">
<input type="hidden" name="id" value="<?php echo "".$reg['id']."" ?>">
<input type="submit" value="Agregar Amigos">
</form></div>
<?php }
$i++;
}
?>
esque no me sale nada, nose si fallo en algo, y nose si esta bien echo el if. gracias. un saludo.