Quantcast
Channel: Programming – Programming blog – website programming blog, blog on website programming .net, java , php and mor
Viewing all articles
Browse latest Browse all 31

PHP Sessions

$
0
0

Starting a PHP Session

  • The session_start() function must appear BEFORE the <html> tag:

[php]

<?php session_start(); ?>

<html>
<body>
</body>
</html>
[/php]

  • The above code is used to register the user session in server.

Destroying a Session

[php]
<?php
session_destroy();
?>
[/php]

  • The above code is used to destroy the complete session from the server.

NOTE :  The session is very very important to save the current user information on the server. Using UID(user id), The server saves the user information on the server.


Viewing all articles
Browse latest Browse all 31

Trending Articles