Ver Mensaje Individual
  #8 (permalink)  
Antiguo 27/10/2008, 10:24
mefeza
 
Fecha de Ingreso: octubre-2008
Mensajes: 11
Antigüedad: 15 años, 6 meses
Puntos: 0
Respuesta: Un include segun opción elegida

Se me ocurre que te pueda funcionar:

Código PHP:
$query mysql_query("SELECT username,password[b],opcion[/b] FROM users WHERE username = '$username' and opcion = 'si'") or die(mysql_error());
$row mysql_fetch_array($query); 
if(
$row){
   include(
"pagina1.php");
}
else{
 
$query mysql_query("SELECT username,password[b],opcion[/b] FROM users WHERE username = '$username' and opcion = 'no'") or die(mysql_error());
$row mysql_fetch_array($query); 
if(
$row){
  include(
"pagina2.php");
}

Tu ya miras como lo puedes mejorar.