Announcement

Collapse
No announcement yet.

sessions and the SID constant

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sessions and the SID constant

    Ok, I want to use the SID constant and the php manual says

    Alternatively, you can use the constant SID which is always defined. If the client did not send an appropriate session cookie, it has the form session_name=session_id. Otherwise, it expands to an empty string. Thus, you can embed it unconditionally into URLs.
    In other words, I don't want to use cookies at all. I want to turn off cookies in runtime, and I wanna avoid setting it globally on the server in php.ini.

    So how can I turn off cookies altogether in my code? It's also a matter of security and it helps if there are no cookies being set.

  • #2
    Ok I found that out. I'll post the solution if anyone is interested. It's as simple as this:

    ini_set("session.use_cookies","0");

    Comment


    • #3
      Originally posted by numerodix
      Ok I found that out. I'll post the solution if anyone is interested. It's as simple as this:

      ini_set("session.use_cookies","0");
      well, if your using the constant session.. can you tell me how to code that cuz im still nubish and cannot figure it out

      Comment


      • #4
        hacking isnt allowed here so i woudlnt talk about it ;D

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X