If you want to force your PHP engine to use cookies to transfer session IDs instead of URL parameters, you can open the PHP configuration file, php.ini, and make the following changes:session.use_cookies = 1session.use_only_cookies = 1Now re-run the first_page.php and next_page.php scripts presented in the previous tutorials. You will get something like:Query string of the incoming URL: Cookies received: PHPSESSID = r66hq1bcg8o79e5i5gd52p26g3Value of MyLogin has been retrieved: FYICenterValue of MyColor has been retrieved: BlueBase on the output, your PHP engine is using cookies to transfer session IDs now, because you can see the cookie named as PHPSESSID contains the session ID, there is no URL parameters related to session ID.
PHP
Topic: Sessions
How To Force the PHP Engine to Use Cookies to Transfer Session IDs?
Browse random answers:
What Is a Session?
How can we register the variables into a session?
How do you destroy a particular or all Sessions?
What is the difference between session_register and $_session?
How many ways can we get the value of current session id?
What is Session Id?
How can we know that a session is started or not?
How many ways can we get the value of current session id?
What is the default session time in php and how can I change it?
What does the unlink() function means?
What does the unset() function means?
what is the definition of a session?
How to initiate a session in PHP?
How is it possible to propagate a session id?
When sessions ends?
How To Turn on the Session Support?
Where does the PHP session stored, either client side or server side?
How To Turn On the Session Support?
what are the advantages of storing sessions in database?
How To Save Values to the Current Session?
How To Retrieve Values from the Current Session?
What Are Options to Transfer Session IDs?
How To Force the PHP Engine to Use Cookies to Transfer Session IDs?
Is It More Secure to Use Cookies to Transfer Session IDs?
Where Are Session Values Stored?
How To Set session.gc_maxlifetime Properly?
How To Set session.gc_divisor Properly?
How To Remove Values Saved in the Current Session?
How To Determine If a Session Is New?
How To Close a Session Properly?
What Is session_register()?