I'm wondering how secure the below code is:
if ($username == $user-username && $password == $user->password) {
$_SESSION['loggedIn'] = true;
$_SESSION['user_id'] = $user->userId;
}
Basically, would there be any way for someone to fake the SESSION variable (besides actually stealing a users cookie)?