when i click logout and page return to login again this line is be in display :
Warning: session_start(): open(C:xampp8tmpsess_16k7kmv1kt181nv4eq17idhirg, O_RDWR) failed: Permission denied (13) in C:xampp8htdocsexample.comcrminit.php on line 8 Warning: session_start(): Failed to read session data: files (path: C:xampp8tmp) in C:xampp8htdocsexample.comcrminit.php on line 8
logout page >>>>>>
<?php include "init.php" ; //include init session_start(); session_unset(); session_destroy(); header('Location: /'); exit(); ?>
init page >>>
<?php //====================================================================================== //============================== session AND DB DASHBORD =============================== //====================================================================================== //connect to database include "db.php"; //session start session_start();
Advertisement
Answer
you must use session_regenerate_id() before of session_start();
for more information read this link: session_destroy