I have a php file which starts a session, this is followed by some html. Later i include another file using include "some_file.php". The some_file.php has php and mysql interaction which is used to populate a table. Now i am starting a session in some_file.php as well, as i need to access the session variables. However i thought that the by using include i won’t have to start a session again. But on doing this i get an error saying undefined session variable in some_file.php, and by using it, i get a notice saying
Notice: A session had already been started - ignoring session_start() in some_file.php/some_line
I have a php file which starts a session, this is followed by some
Share
If you can’t make sure your session is always started, you have to check if its started: