Defining and Using Sessions
You can define cookies when using sessions or simply let the session manage cookies. When you start a PHP session, the session implicitly creates a session identifier cookie, provided the browser is configured to accept cookies. You should consider collecting that information using JavaScript embedded in your nonauthenticated login form. You can send that browser setting as a hidden input when the user clicks the HTML input widget and transmits his or her login information. When cookies are supported, you can use them, and when they’re blocked, you can implement URL rewriting.
The principal discussion in this section assumes the browser accepts cookies. The section “Applying Cookies and Sessions” later in the chapter ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access