Tema: como hacer
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 19/01/2009, 13:49
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 10 meses
Puntos: 416
Respuesta: como hacer

Primero, al usar la consulta: select nick from login3 where nombre = '$usuario', esta no te va a devolver si ya esta vista o no.

Tienes que hacer: SELECT vista FROM login3 WHERE nombre='$usuario';
Luego, haces el mysql_result y comparas:
if($variable == '0') {
//Do this
} else {
//Do this instead
}