Geeks With Blogs
Stephanie Grima C#, ASP.NET and my life.

 

When declaring sessions in PHP, you need to declare it on the very fist line of the php file, with no spaces before it. Therefore, this means it has to be even before the DOCTYPE if you are making use of html in the same page.

The code to write is the following:

<?
 session_start();
?>

With this code, you are now able to create sessions, read from sessions, check if a session is existing or not, and to destroy sessions.

 

Posted on Monday, December 22, 2008 9:56 PM PHP | Back to top


Comments on this post: [PHP] Declaring Sessions

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Steffi | Powered by: GeeksWithBlogs.net