Log in

View Full Version : cookie problem



purnendu2311
02-13-2008, 07:30 AM
Hi
I am doing my browser cookie disable from my firefox browser and trying to login to site. it is not login. once i enable the cookie from browser, then it is logged in. I want to disable my cookie and i want successful login to my site.. how? do you know?
Note: In my site login page, I am storing the email id pwd into session.

Regards
Ranjan

Jas
02-14-2008, 04:01 AM
Sessions use either cookies or the URL (via the $_GET global) to get the session ID. To use the session ID in the URL, you need to change your PHP INI file. Note, however, that this can lead to session hijaking, which is where other people can use the same URL so as to fool the server into thinking the user is someone their not. But, if you take some extra steps (no ideas come to mind right now :(), you can make it work. Here is the PHP INI code you need to change:



session.use_cookies = 0


And for your session start

session_id($_GET['PHPSESSID']);
session_start();

I think that's how you do it, but I've never tried.