Hi all,

Can anyone tell me if it's possible to check if a member is logged in and a session has been started using the same PHP page.

I'm only new to PHP and MySQL and am having problems with the way I should have my main PHP page (index page) setup.

What I would like is to first require a config.inc file. Then include the header & nav pages. I know how to do that much

It's the parsing order after that that i'm not sure of.
Next I would like the page to check to make sure the member/person is logged in. If not display the login form. But i'd also like it to check to see if there has been a session created if they have in fact logged in and if not to create a new one.

Can anyone tell me how I go about doing this, or what would be sooooo much nicer, would be if someone could help me out with it.

------------------
KeithMcL - KMcLUK@aol.com
http://www.webmasterswork.com - #1 source for web developer jobs online.
http://www.webdesignreviews.com - Reviews by the experts.