Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/12/2011, 10:21
chumy_
 
Fecha de Ingreso: noviembre-2011
Mensajes: 121
Antigüedad: 12 años, 5 meses
Puntos: 0
Respuesta: inicio de sesion diferentes usuarios

ingreso2.php
Código PHP:
    <?
    session_start
();

    if(
$_SESSION["falla"]==0)
    {

    
$_SESSION["autorizacion"]="si";

    
header("Location: ../index.php");

    }

    else
    {
    unset(
$_SESSION["falla"]);

    
session_destroy();

    
header("Location: index.php");

    }
    
?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>
</body>
</html>
y lo modifique con esto, pero algo falta o algo esta mal, y no redirecciona...

Código PHP:
    <?
    session_start
();


    if(
$_SESSION["falla"]==0)
    {

    
$_SESSION["atributo"]= $_POST['atri'];

    
                if(
$_SESSION['atri'] == 'administrador'){
               
                
header("Location: ../adminopt.php" );
               
                }elseif(
$_SESSION['atri'] == 'tecnico'){
               
                
header("Location: ../formtecopt.php" );
               
                }elseif(
$_SESSION['atri'] == 'cliente'){
               
                
header("Location: ../index.php" );}

    }

    else
    {
    unset(
$_SESSION["falla"]);

    
session_destroy();

    
header("Location: index.php");

    }
    
?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>
</body>
</html>