Ver Mensaje Individual
  #4 (permalink)  
Antiguo 15/12/2015, 14:52
c_sanchez83
 
Fecha de Ingreso: diciembre-2015
Ubicación: Monterrey
Mensajes: 1
Antigüedad: 8 años, 4 meses
Puntos: 0
Respuesta: problema con session_register();

Hola, quisiera de su ayuda para solucionar este tema, veo que ya tiene vario tiempo desde que se realizo esta consulta.

Son nuevo en php y me pidieron actualizar una web y me marca error al ingresar con usuario y contraseña. como lo puedo solucionar?

gracias.

Fatal error: Call to undefined function session_register() in /home/dominio/public_html/web/login.php on line 19

este es mi código en ese archivo:

Código PHP:
?
include(
"./include/General.php");
include(
"./include/Database.php");
if (!
$_POST){
    
header("Location: inicio.php");
    
}else{
    
$login=$_POST['login'];
    
$password=$_POST['password'];
    
AbrirConexion();
    
$strQuery "select id_usuario,login,password,nombre,perfil from usuarios where login='".$login."'";
    
$Conexion->Query($strQuery);
    
$UserOK $Conexion->RowCount;
    
    if (
$UserOK >0){
        
$User $Conexion->FetchObject();
        if (
$User->password == $password) {
            
session_start();
            
session_register("GESTION");
            
session_register("GESTION_USR");
            
session_register("GESTION_CLA");
            
session_register("GESTION_NOM");
            
session_register("GESTION_PER");
            

            
$_SESSION['GESTION']=TRUE;
            
$_SESSION['GESTION_CLA']=$User->id_usuario;
            
$_SESSION['GESTION_USR']=$login;
            
$_SESSION['GESTION_NOM']=$User->nombre;
            
$_SESSION['GESTION_PER']=$User->perfil;    
            
            
            
            
header("Location: navega.php");
        }else{    
            
header("Location: inicio.php?Mensage=[Password%20Incorrecto]");
            
        }    
    }else{
        
header("Location: inicio.php?Mensage=[Login%20Incorrecto]");

    }
}
?>