PDA

View Full Version : sessions and the SID constant


numerodix
Fri 19th Dec '03, 2:18pm
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.

numerodix
Fri 19th Dec '03, 2:21pm
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");

AnthonyR
Fri 19th Dec '03, 4:31pm
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

Zachery
Fri 19th Dec '03, 4:44pm
hacking isnt allowed here :) so i woudlnt talk about it ;D