php question

Discussion in 'OT Technology' started by D1G1T4L, Jun 11, 2007.

  1. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    I was wondering what's the difference between creating a session variable this way
    Code:
    $_SESSION['test'] = "hello";
    $test = $_SESSION['test'];
    echo $test;
    
    and this way

    Code:
    session_register("test");
    $test = "hello";
    echo $test;
    


    also difference between using
    unset($_SESSION['test]); and using session_unregister("test");
     
  2. opie

    opie hi. OT Supporter

    Joined:
    Sep 29, 2004
    Messages:
    6,025
    Likes Received:
    0
    Location:
    AZ
    No clue -- I've always done it this way;

    $_SESSION['test'] = "hello";
    $test = $_SESSION['test'];
    echo $test;
     

Share This Page