Forum : Global sessions!!!
Brief description  about Online courses   join in Online courses
View Navneet  Khanna 's Profile

Global sessions!!!

Good Afternoon Tutor

What are global sessions and private sessions? What are its uses?

Regards
Asked by Navneet Khanna | Sep 10, 2009 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Navneet,

$_SESSION is a superglobal variable. It means you don't need to define global $_SESSION in your script. It is done by PHP default. So you can use this variable any where you want in your application. It will persist between PHP pages. So you can assign value to this variable in one page and use it in other pages.

By default PHP store sessions in default system temporary directory, that information will be deleted once sessions expires.

If you want to store your sessions information for future use , you can store in private directories or in a database table. then you can say it as private sessions.

Regards,
Sep 11, 2009