ESH/review_role_selection.php
2024-10-23 18:28:06 +05:30

31 lines
975 B
PHP

<?php
include_once ('techsyn_header_blank.php');
$_SESSION['Role_Id'] = $_POST['role_id'];
$sql = "select * from role_master where role_id ='".$_POST['role_id']."'";
// echo $sql;
$result = mysqli_query($conn,$sql);
$num = @mysqli_num_rows($result);
if ($num > 0) {
if ($row = @mysqli_fetch_array($result)) {
$_SESSION['RoleId'] = $_REQUEST['role_id'];
$_SESSION['RoleCode'] = $row['role_code'];
$_SESSION['role_home_page'] = $row['role_home_page'];
}
}
if (isset($_SESSION['role_home_page']) && $_SESSION['role_home_page']!=null && $_SESSION['role_home_page']!='')
{
echo "<script>location.replace('".$_SESSION['role_home_page']."')</script>";
}
else {
$_SESSION['role_home_page']="home.php";
echo "<script>location.replace('home.php')</script>";
}
//echo "<script>location.replace('home.php')</script>";
?>