Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    kjc
    kjc is offline
    New Coder
    Join Date
    Jun 2002
    Location
    England
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is the PHP session ID still created without session_start?

    Does anyone know if this is true as I want to take out the session_start();. I am not registering any session variables, just the PHP Session_ID?

    Cheers
    Eternity

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    A session is started either when you call session_start() or session_register(), or when you have set session.auto_start to 1 in your php.ini. Without these you can't access session data.
    De gustibus non est disputandum.

  • #3
    kjc
    kjc is offline
    New Coder
    Join Date
    Jun 2002
    Location
    England
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Would i need session start on every page or just the first page....
    Eternity

  • #4
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Originally posted by kjc
    Would i need session start on every page or just the first page....
    On any page you wish to access the session data.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

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