Thursday, April 7, 2011

How Session works if Cookies are disabled in PHP

Session will work if cookies are enabled in browser. If cookies are disabled, then apache checks whether PHP is configured with
--enable-trans-sid
and
--enable-track-vars
options.

If these values are set true, then PHP will pass session id by POST method automatically. But we have to use session functions regularly.
If "--enable-trans-sid" and "--enable-track-vars" values are set to FALSE, we need to pass session id by using the SID constant.
< a href="index.php?<?= SID ?>" >Navigate from here< /a >

5 comments: