I am withdrawing from the database a page name and putting into the this equal statement:
// Redirect if not there
if ($db_client === $session_client) {
require("custom.php");
} else {
require("general.php");
}
So here, $db_client is the client id stored for a custom page and $session_client being the id in the session. If it matches it should take the user to custom.php and if not it should take them to general.php
For some reason PHP shows me both pages. general.php on top and custom.php at the bottom of the general.php
I am using this on general page:
// If not page (path) is stored in db than show general
if (empty($pagename)) {
require_once("general.php");
} else {
require_once("$pagename");
}
Any way to fix this?