Jump to content

Archived

This topic is now archived and is closed to further replies.

mistakes!

sessions

Recommended Posts

hello everyone can sumone pls explain the meaning of this code?


if(!isset($_SESSION['login']))
{
unset($_SESSION);
session_destroy();
unset($_GET);
unset($_POST);

Share this post


Link to post
Share on other sites
[b]if(!isset($_SESSION['login']))
{[/b]
Checks if $_SESSION['login'] has a value.


[b]unset($_SESSION);[/b]
Destroy the $_SESSION variable.

[b]session_destroy();[/b]
Destorys everything associated with the current session.

[b]unset($_GET);
unset($_POST);[/b]
Same as unset($_SESSION);.

You can pretty much find out what each of these functions do by looking them up in the PHP manual at www.php.net

[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.