Ver Mensaje Individual
  #12 (permalink)  
Antiguo 08/11/2011, 11:57
edyuin
(Desactivado)
 
Fecha de Ingreso: septiembre-2011
Mensajes: 283
Antigüedad: 12 años, 7 meses
Puntos: 10
Respuesta: como hacer un if

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.