Forum Moderators: coopster
session_start();
if((!$_SESSION[username]) && (isset($_POST[username])) && (isset($_POST[password])) {
$username = $_POST[username];
$userpass = $_POST[userpass];
$_SESSION[username] = $username;
$_SESSION[userpass] = $userpass;
} else {
$username = $_SESSION[username];
$userpass = $_SESSION[userpass];
}
?>
...why is the bracket "unexpected"?
[edited by: mylungsarempty at 2:45 am (utc) on Dec. 31, 2003]
if((!$_SESSION['username']) && (isset($_POST['username']) && isset($_POST['password'])) {
You seem to be missing a closing bracket in the second part of this statement; maybe try changing to this:
if((!$_SESSION['username']) && (isset($_POST['username'])) && (isset($_POST['password']))) {
if((!$_SESSION['username']) && (isset($_POST['username']) && isset($_POST['password']))
1 2 .................... 1 .. 2 ... 3 ................ 2 ....... 3 ................ 2 1