- You ob_start() but never ob_end_*(), so you're never going to get any output from the pages unless you further manipulated it on down the line.
- include()ing by an absolute URL will include only the output of the file, not any variables it may define.
- The constant "username" is never defined, insofar as I can tell (although it may be in config.php).
Other than that, your code should be good.
Is their anyway to get it to work by checking if the user is logged in and insted of echoing the page maybe continue loading it?
Code:
<?php
require_once('config.php');
if(!$logged[username])
die(header('Location: http://myurl.com/login.php'));
?>
Bookmarks