Soooo I’m tearing my hair out.
I am just trying to make a switch that, after a successful login, it checks for the userlevel of the user, passes it to a switch and based on the case, redirects to their respective page. Backend is Oracle 11g.
// After successful login
$sql=“select userlevel from LOGIN where USERNAME=’”.$_SESSION[“UserID”]."’";
$rs = CustomQuery($sql);
header(“Location: main.php”); // redirect to main page if no permission is set
} // function AfterSuccessfulLogin
For the funky variables, forgive me, I’m modding PHPRunner stuff.
So, this logs the user in but it ONLY redirects to the first case specified. (In the code above: AUDIT_TABLE_list.php). If I change the cases to numbers (and equivalently change the datatype on the column to number as well) I get the same problem. If I quote the numbers, it displays the default page. Here are the things I know:
When I sqlplus at the command line, here is what this query returns:
SQL>select userlevel from login;
Therefore, I know that I did not mispell anything. Is it not fetching the array properly? What’s going wrong? How can I get it to recognize the other cases? Should I just start from scratch and make the switch without using the PHPRunner variables - if so, what does this look like for Oracle?
m._.m Any help is appreciated, thank you.