Jump to content
Larry Ullman's Book Forums

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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...