I made a simple login function in PHP. My problem is that there are no session attributes when the browser hits page login_success.php
After i store
Apart from using session_start()
, there can be a couple of other reasons as well:
df -h
).Configure your php.ini
like this:
session.auto_start = 1;
Or run following command at your first line:
ini_set('session.auto_start', 1);
Just use <?php session_start() ?>
on top of page.
According to the php documentation: session_start
session_start() creates a session or resumes the current one based on a session identifier passed via a GET or POST request, or passed via a cookie.
So add session_start()
to the top of your checklogin.php page.