Here is the code:
final public function login($email) {
$this->email = mysql_real_escape_string($email);
$this->q = "SELECT id FROM users WHERE mail = '$this->email'";
$this->r = mysql_query($this->q);
$this->id = mysql_result($this->r, 0);
$_SESSION['id'] = "$this->id";
header('Location: me.php');
exit;
}
I am not sure when I redirect the session, I do not stay. I repeated it on the current page and it showed. Any solutions? I have a global namespace, so the session is established in all files.
source
share