Hello every one I have a doubt in php .IN our project we need to include all the palges into our index.php. Header and footer are same for all the pages.But body should change as per the redirecting of each page.And according to our client that redirection should happen in index page only. So we should not use in the following manner header('location:login.php'); we need to use like header('location:index.php?getpage="register.php"');
and in index page we need to check the condition if(getpage contains value) { redirect to getpage url } else { redirect to login page }
But my problem is how to check the condition in index page if Iam using $session of getpage it is showing error that getpage variable is not declared.Please tell solution for my problem Answer will be highly appreciated