Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/07/2007, 12:14
Avatar de gerson
gerson
 
Fecha de Ingreso: febrero-2005
Ubicación: Lima
Mensajes: 481
Antigüedad: 19 años, 3 meses
Puntos: 4
Re: autentificacion de usuarios

Hola Ludwingg prueba esto, hice algunas modificaciones:
Código PHP:
 <?php
include("library.php"); 
conexion(); 
$user $_POST['user'];
$pass $_POST['pass'];
//-- 
$query=mysql_query("Select * From usuarios WHERE user='$user' and pass='$pass'"); 
$row=mysql_fetch_array($query);
if(
$row!==FALSE){ 
    
session_start();     
    
$autentificado="si"
    
session_register("autentificado");
    
//-- 
    
if($row["nivel"]=="1"){     
        
header("Location:admin.php");     
    } 
    else{ 
        
header("Location:admin2.php");     
    } 

else{ 
    
header("Location:entrar.php?errorusuario=si"); 
}
?>
Saludos
__________________