Options to Transfer Session IDs in PHP

Q

What Are Options to Transfer Session IDs in PHP?

✍: FYIcenter.com

A

Once a new session is created, its session ID must be transferred to the client browser and included in the next client request, so that the PHP engine can find the same session created by the same visitor. The PHP engine has two options to transfer the session ID to the client browser:

  • As URL parameter - The Session ID will be embedded in all URLs in the HTML document delivered to the client browser. When the visitor clicks any of those URLs, the session ID will be returned back to the Web server as part of the requesting URL.
  • As a cookie - The session ID will be delivered as a cookie to the client browser. When visitor requests any other pages on the Web server, the session ID will be returned back to the Web server also as a cookie.

The PHP engine is configured to use URL parameters for transferring session IDs by default.

 

How Sessoion IDs Are Transferred in PHP

Retrieving Session ID from the Current Session in PHP

Understanding and Using Sessions in PHP

⇑⇑ PHP Tutorials

2016-10-26, 1536🔥, 0💬