Re: Problem Directing the Page with header

From: Date: Fri, 16 Feb 2007 12:49:35 +0000
Subject: Re: Problem Directing the Page with header
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-248957@lists.php.net to get a copy of this message
On Thu, 15 Feb 2007, Ashish Rizal wrote:
<?php session_start(); require_once 'functions.php'; $UserName = $_POST['UserName']; $Password = $_POST['Password']; $error = login_check($_POST); $adminAddress = getAbsolutePath().'adminlogin.php'; $userAddress = getAbsolutePath().'userlogin.php'; $samePage = getAbsolutePath().'login-new.php'; if (trim ($error)=="") { $accesslevel = accessLevel($UserName); if ($accesslevel == "admin"){ $_SESSION["userid"] = login($_POST);
You need to put a session_commit(); here, so session gets writen.
header("Location: $adminAddress"); exit(); }
-- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18 ---------------------------------------------------------
Lic. Martín Marqués         |   SELECT 'mmarques' ||
Centro de Telemática        |       '@' || 'unl.edu.ar';
Universidad Nacional        |   DBA, Programador,
    del Litoral             |   Administrador
---------------------------------------------------------

« previous php.general (#248957) next »