CreateSession($userID); if (isset($_GET['referral'])) { header("Location: " . $_GET['referral']); die(); } header("Location: /"); die(); } else { $error = "Username or password incorrect"; } } else { $error = "Username or password incorrect"; } } $body = '
Login
'.(($error != "")? '':"").'
Don\'t have an account? Register here!
'; pageHandler(); $ph->footer = ""; $ph->pageTitle("Login"); $ph->body = $body; $ph->output();