Ok I have sessions running. I'm using username and pass as my session names. Now on all other pages we're doing good. I come to a page that calls for $username, and gets nothing at first so sets it to nothing. This cancels my session! Here take a look:
<?php
session_start();
if (!isset($_SESSION['username']) || !isset($_SESSION['pass'])) {
header("Location: http://brent.controlled-insanity.com/login.php");
exit;
}
include('./includes/header.tpl');
include('./includes/navigation.tpl');
$username = $_POST['username'];
$userid = $_GET['id'];
$password = $_POST['password'];
$cpassword = $_POST['cpassword'];
$email = $_POST['email'];
$access = $_POST['access'];
switch($mode) {
So how is $username changing $SESSION['username']
Oh and I also noticed while a made a mistake before and didnt retrieve $access = $POST['access'] before, $access was holding thr right value. Its as if my superglobals dont exist! 😕