session help
<?php
session_start();
include("connect.php");
$username1 = $_SESSION['username'];
if (!isset($_SESSION['$username'])) {
echo "Sorry Your Not Logged In" . $_session['username'];
exit();
}
else if (isset($_GET['logout'])) {
session_destroy();
echo "You Have Been Successfully Logged Out";
}
?> else if the logout button was pressed destroy the session and echo success pretty straight forward
now if I change that and echo out that $username1 = $_SESSION['username'] echos fine so that tells me that the session is set ??? dosn't it?
issue is i'm always getting the sorry your not logged in but not the username??
what am I doing wrong here?
-
phpg -
Thanks
{{ DiscussionBoard.errors[6050595].message }} -