When I set a session: session_start();

I notice the cookie getting set in my browser's cookies folder. The cookie name is PHPSESSID. Am I able to change the cookie name.

I ask because I have admin and customer account login pages. Sometimes I like to log into both. I don't think it matters, but I felt it was worth asking if I should set different cookies for both accounts. And if so, is that changing the session name?

    Yes, the default name of a session is set to PHPSESSID (or whatever the value is for session.name in the php.ini file); you can change this by using the [man]session_name/man function.

      Write a Reply...