I have this code where a user that is logged in, gets a specific page from the 'views' folder (protected by htaccess). Only when logged in can you grant access to the page. Here is an example of the code
if ($login->isUserLoggedIn() == true) {
include("views/page_to_show.php");
} else {
//I simply show the "you are not logged in" view.
include("views/not_logged_in.php");
}
This works. The thing is though, I want to organise my pages a little more. So I want to move a couple of pages to a folder within the views folder.
So for example:
if ($login->isUserLoggedIn() == true) {
include("views/folder/page_to_show.php");
} else {
//I simply show the "you are not logged in" view.
include("views/not_logged_in.php");
}
The script can be found on mydomain.com/folder/page_to_show.php but when I try to open it, I am not getting the page from the views folder, neither getting anything like an error. Just a blank page. Does anyone know what is happening and why I can not organise my pages like this?