Results 1 to 6 of 6

Thread: PHP Session ID

  1. #1
    Join Date
    Jun 2009
    Posts
    62
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default PHP Session ID

    PHP Sessions... I have tried to follow every tutorial on Google bu none of them give me an explanation on a session ID.
    What's a session Id, how do I use it??
    I don't currently use session ID's and my login still works. But does this add more security?
    I have this code:
    PHP Code:
    <?
    session_start
    ();
    if(!
    session_is_registered(username)){
    header("location:login.php");
    }
    ?>
    Do I need to make this more secure using session id's??

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    if you're using sessions, you've got a session id. the session id is generated by the server to keep track of the session; you don't assign it.

  3. #3
    Join Date
    Jun 2009
    Posts
    62
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default

    Thanks. On a website I have seen:
    page.php?PHPSESSIONID=idcode
    when is this nessacary?

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    ...I'm not sure. It may be trying to do something else. Can you post a link to the tutorial you're trying to follow?

  5. #5
    Join Date
    Jun 2009
    Posts
    62
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default

    It's not a tutorial. On this website it says page.php?PHPSESSID=sessionidhere
    so this isn't important?

  6. #6
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by onestopplay View Post
    It's not a tutorial.
    I'm sorry, your first post makes it sound like you're looking at tutorials.
    Quote Originally Posted by onestopplay View Post
    On this website it says page.php?PHPSESSID=sessionidhere
    so this isn't important?
    What website are you looking at? Please post a link.

    On its own, that line is completely meaningless. Something else on the page or server has to make use of it. Is it in the address bar (it looks like some info being passed between pages via GET, which isn't a "session" at all)?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •