Ashish Rizal wrote:
Hi, I am having problem with redirecting the page in user
authenication page . I am working on my windows machine as a
localhost with PHP Version 5.2.0. Everything is working good in
local machine (in Windows) but now when i tried to upload the
same code to the server which is using PHP Version 5.1.6, it does
not seem to redirect my page. I have a main loginpage which on
post goes to the logincheck.php and in Login.php i have all the
stuffs to authenticate and redirect the user. I am pasting the
logincheck.php code below.
one thing to watch for is case-sensitivity. you have a logincheck.php and then a Login.php are you sure that the file has a 'L' in the name?

This is actually all mute if you are running on a windows server also. Do you know what OS is on the server? Linux, BSD, Windows, Mac...

when you say "it does not seem to rediret my page"... What does it do instead??? Error...


<?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);
header("Location: $adminAddress");
exit();
}
else if ($accesslevel == "user"){
$_SESSION["userid"] = login($_POST);
header("Location: $userAddress");
exit();
}
}
else {
$errorMessage = '$error';
header("Location: $samePage");
exit();
}
?>

Any Help would be highly aprriciated.
Thanks a lot


--
Enjoy,

Jim Lucas

Different eyes see different things. Different hearts beat on different strings. But there are times for you and me when all such things agree.

- Rush

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to