how to start session
Moderator: General Moderators
-
yasir_memon
- Forum Commoner
- Posts: 48
- Joined: Tue Aug 11, 2009 12:29 am
how to start session
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
Turn on the ’session.auto_start’ option in your php.ini
Last edited by VladSun on Thu Sep 03, 2009 1:36 am, edited 1 time in total.
There are 10 types of people in this world, those who understand binary and those who don't
Re: how to start session
hi u need to start session at the very first line in each and every page......
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
-
yasir_memon
- Forum Commoner
- Posts: 48
- Joined: Tue Aug 11, 2009 12:29 am
Re: how to start session
is this not php code form?????????
Re: how to start session
You can start the session on common page. You do not need to start at every pages..
Re: how to start session
If each of your PHP pages has a common file they include, you can put session_start() in that file.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.