Jump to content
Larry Ullman's Book Forums

Session Handling


Recommended Posts

I'm trying to build a site with modularization concept described in the book. Like, index file contains header.html and footer.html. The header file starts session and it is included in other modules wherever required. I want to include login.php on the index.php. index.php includes header.html, which starts session. Now login.php also needs to get access to session.

 

If I use a statement like session_start() at the beginning of login.php, then it gives me error "session already started in header.html"... And that is true, as it is included at the beginning of the index.php file. Same error appears if I include header.html in login.php..

What is the way around?

Link to comment
Share on other sites

 Share

×
×
  • Create New...