I have a url path that will send through this myGlobalFunction();
from a different file.
So the following script tag will catch the user on the website root and forward him to the login page. I can't seem to make this working. I know i am missing the single and double quotes. :(
if (!isset($_SESSION['role']))
{
echo '<script>window.location.assign("'.myGlobalFunction().'/onboardingform/core/admin/login.php")</script>';
exit();
} else if (isset($_SESSION['role'])) {
if($_SESSION['role'] =='CLIENT') {
echo "<script>window.location.assign('/onboardingform/core/client/index.php')</script>";
exit();
} else if($_SESSION['role'] =='RESELLER') {
echo "<script>window.location.assign('/onboardingform/core/reseller/index.php')</script>";
exit();
} else if($_SESSION['role'] =='CSR') {
echo "<script>window.location.assign('/onboardingform/core/csr/index.php')</script>";
exit();
} else if($_SESSION['role'] == 'ADMIN') {
?>