Forum : How to start a PHP SESSION?
Brief description  about Online courses   join in Online courses
View Arun  Desai 's Profile

How to start a PHP SESSION?

How to start a PHP SESSION?????
Asked by Arun Desai | Mar 17, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Arun,
Before you can store user information in your PHP session, you must first start up the session.
Note: The session_start() function must appear BEFORE the <html> tag:
<?php session_start(); ?>
<html>
<body>
</body>
</html>
The code above will register the user's session with the server, allow you to start saving user information, and assign a UID for that user's session.
Mar 17, 2010