Page 1 of 1

how to start session

Posted: Thu Sep 03, 2009 12:10 am
by yasir_memon
i have 10 php pages and i am using session in each page where i write session_start() on each page is there any way that i only start session on one page and automatically it starts on every page.

Re: how to start session

Posted: Thu Sep 03, 2009 12:59 am
by VladSun
Turn on the ’session.auto_start’ option in your php.ini

Re: how to start session

Posted: Thu Sep 03, 2009 1:08 am
by bala_1225
hi u need to start session at the very first line in each and every page......

Re: how to start session

Posted: Thu Sep 03, 2009 1:50 am
by Christopher
Moved to the PHP -Code forum.

Re: how to start session

Posted: Thu Sep 03, 2009 3:29 am
by yasir_memon
is this not php code form?????????

Re: how to start session

Posted: Thu Sep 03, 2009 3:47 am
by pcoder
You can start the session on common page. You do not need to start at every pages..

Re: how to start session

Posted: Thu Sep 03, 2009 10:19 am
by pickle
If each of your PHP pages has a common file they include, you can put session_start() in that file.