Hello,
I have been making a site, its pretty darn awesome if you ask me (Normally I fail at visual design). Anyway its private so only my friends can access it- I use sessions to store the login data as the user moves around my site. If I visit the homepage I get redirected to my login page, then once I have logged in I get this:
A white screen!
All I know is that commenting and uncommenting the page that handles checking the user is logged in (and also commenting/uncommenting a small script that sets the user id to 1, so the site can still function without a proper login when I'm debugging) causes this white page! I have found nothing in my error logs (I will try to find some others as these only seem to have 404s and such).
Here is the login handler.
I won't upload the actual page for the sake of all our sanity but I do know it commits suicide if MySQL queries that involve the user ID fail...
<?php
session_start();
function reqLogin() {
header('Location: /login.php');
}
if(isset($_SESSION['login'])) {
if($_SESSION['login'] == true) {
$userID == $_SESSION['id'];
} else {
reqLogin();
}
} else {
reqLogin();
}
?>


Sign In
Create Account


Back to top









