SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: PHP Sessions

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2003
    Location
    Denver
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Sessions

    Hi,

    I have a problem, I think. I have 2 different admins, that are totally seperate. But the problem is that one is more site wide, and i don't want to create the session in one admin and have it conflict with the other because that session has nothing to do with the other admin/side.

    So my question is how to create totally independent sessions, that won't conflict with each other, and the 2 admins won't touch the others session if created.

    Hopefully you understand what I am asking about. Thanks.

  2. #2
    PHP manual bot bronze trophy Gaheris's Avatar
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    session_id
    As much as I hate only-a-link posts...

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2003
    Location
    Denver
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, thanks I saw that in my research, but I guess what you and the php manual is trying to tell me is to create a constant number like 1 is for a-admin and 2 is for b-admin, is that the way the session_id works, our am i totally of the subject. Because if it doesn't i still can't tell what session is for what admin. Right

  4. #4
    PHP manual bot bronze trophy Gaheris's Avatar
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Uh, I was wrong, I IMO misinterpreted the question, sorry.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2003
    Location
    Denver
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ya, it is confusing i need to keep things seperate.

    I have one admin that has its own set of passwords, users.

    And one that is totally seperate set of passwords, users

    And i want to keep it the sessions seperate. because if I call something like a session variable defined when the session is created I could get wrong data back because they are part of the other admin and a seperate session.

  6. #6
    SitePoint Enthusiast
    Join Date
    Jul 2003
    Location
    Denver
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Basically, can i somehow say

    session_start(); when i call this function can i call it a different name like session2_start(); so that in the future can call it with $SESSION2 and the other stays at session_start();

  7. #7
    SitePoint Enthusiast
    Join Date
    Jul 2003
    Location
    Denver
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    would the session_name work

  8. #8
    PHP manual bot bronze trophy Gaheris's Avatar
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now I know why I posted session_id, I actually mixed it up with session_name, yeah, that's the function you probably want.


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
  •