hi n working with a code but m facing a problem of undefined index. i have seen it occurs due to unavailablity of data or like that but here i m declaring that data jst before its use. rest of variable are working correctly just SESS_dept is giving error plz can you] tel why?
$employee = mysql_fetch_assoc($result);
$_SESSION['SESS_EMP_ID'] = $employee['employee_id'];
$_SESSION['SESS_NAME'] = $employee['employee_name'];
$_SESSION['SESS__dept']=$employee['department_name'];
$_SESSION['SESS_rank']=$employee['rank'];
session_write_close();
if
($_SESSION['SESS_rank']=="admin")
{
header("location: administrator.php");
exit();
}
elseif ($_SESSION['SESS_dept']=="molding")
{
if($_SESSION['SESS_rank']=="shift incharge")
{
header ("location: Shift_incharge.php");
exit();
}