Hi , I am having some problem with redirecting the webpage after authenticating the user login. I have pasted the code below. My main body is after the last line of the code. Everything is working fine except the redirection one. I dont know whats wrong with my code
<?php
session_start() ;
require_once 'functions.php' ;
$UserName = $_POST['UserName'];
$Password = $_POST['Password'];
if ($_POST){
$error = login_check($_P OST);
if (trim ($error)=="")
{
$accesslevel = accessLevel($Us erName);
?>
<?php
if ($accesslevel == "admin"){
//echo "this is admin";
$_SESSION["userid"] = login($_POST);
header('Locatio n: adminlogin.php' );
exit();
}
else if ($accesslevel == "user") {
//echo "this is user";
$_SESSION["userid"] = login($_POST);
header('Locatio n: userlogin.php') ;
exit();
}
}
else {
print "Error :$error";
}
}
?>
<BODY>
<FORM id=form1 name=loginform method=post>
<TABLE align=center>
<TBODY>
<TR>
<?php
session_start() ;
require_once 'functions.php' ;
$UserName = $_POST['UserName'];
$Password = $_POST['Password'];
if ($_POST){
$error = login_check($_P OST);
if (trim ($error)=="")
{
$accesslevel = accessLevel($Us erName);
?>
<?php
if ($accesslevel == "admin"){
//echo "this is admin";
$_SESSION["userid"] = login($_POST);
header('Locatio n: adminlogin.php' );
exit();
}
else if ($accesslevel == "user") {
//echo "this is user";
$_SESSION["userid"] = login($_POST);
header('Locatio n: userlogin.php') ;
exit();
}
}
else {
print "Error :$error";
}
}
?>
<BODY>
<FORM id=form1 name=loginform method=post>
<TABLE align=center>
<TBODY>
<TR>
Comment