i am new with session havent tried it b4 and im currently doing a project where in i need to use a session but since i tried the code
session_start();
$SESSION['username'] = $username;
$SESSION['password'] = $password;
it does give me an error like this.
Warning: session_start(): open(/tmp\sess_796cf477445acc224c88e2633148b8a5, O_RDWR) failed: No such file or directory (2) in c:\webserver\home\userspage.php on line 18
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\webserver\home\radio\userspage.php:18) in c:\webserver\home\radio\userspage.php on line 18
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\webserver\home\userspage.php:18) in c:\webserver\home\userspage.php on line 18
so basically from my login page i go directly to userspage.php and from the top of the page i have a query and check if the username and password is correct then if it correct i include the code
session_start();
$SESSION['username'] = $username;
$SESSION['password'] = $password;
thats why it give an error and i dont know how to fix it can someone tell me pls?
thank you in advance