So I know I can restrict the viewing of a page by session/access using this
<?PHP
require_once('../../lib/connections/db.php');
include('../../lib/functions/functions.php');
checkLogin('2');
$getuser = getUserRecords($_SESSION['user_id']);
?>
is there a way to add to that if the id of the page doesnt match the username in the same database it wont allow you to look at the page?
id meaning "page.php?id=username"
thanks for your help.