Georgezx9 Posted February 18, 2015 Share Posted February 18, 2015 Hi, I have the login system working well now, with some extra bits, the login takes me to a new photogallery in HTML, but I only want registered users to see the gallery, therefore I have copied code from other bits of chapter 18 as follows: I.e it only executes the HTML if the session variable is set, this all works, but what this does is puts a banner from the header.html file, with "User Registration on the screen and a bar across, I don't want this, I simply want a blank screen, as the new HTML page sets its own CSS styles, whats best way to do this. If I remove header from the page it wont load <?php require ('includes/config.inc.php'); $page_title = 'Logout'; include ('includes/header.html'); //If no first_name session variable exists, redirect the user: if (!isset($_SESSION['first_name'])) { $url = BASE_URL . 'index.php'; // Define the URL. $url='http://localhost/index.php'; echo '<h3>You are not logged in.</h3>'; ob_end_clean();// Delete the buffer. header("Location: $url"); exit(); // Quit the script. } Else { ?> //<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"xml:lang="en"> .. .. .. <?Php } ?> Link to comment Share on other sites More sharing options...
Larry Posted March 28, 2015 Share Posted March 28, 2015 So sorry for the delay! This slipped through the cracks. Are you still having issues with this? Link to comment Share on other sites More sharing options...
Recommended Posts