Jump to content


Photo

sessions


  • Please log in to reply
1 reply to this topic

#1 mistakes!

mistakes!
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 09 May 2006 - 08:32 PM

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


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


#2 jeremywesselman

jeremywesselman
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts
  • LocationIndependence, KY

Posted 09 May 2006 - 08:50 PM

if(!isset($_SESSION['login']))
{

Checks if $_SESSION['login'] has a value.


unset($_SESSION);
Destroy the $_SESSION variable.

session_destroy();
Destorys everything associated with the current session.

unset($_GET);
unset($_POST);

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--]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users