"TG" <tg********@cox.net> wrote in message news:<MMCYb.6447$Dc2.1966@lakeread01>...
How can I test to ensure a visitors browser allows for cookies? When I
recently setup my browser to not allow cookies and I visited my website my
global and session variables stopped working between pages. Once I set allow
cookies back on, it started working again.
Thanks in advance.
I'm not sure that there is a straight-forward way to test from a
server-side language like PHP, because PHP has to choose to set the
cookie or not in the HTTP header, before content is sent out. This
kind of check is perhaps better suited to Java Script?
However, the php.ini setting "session.use_trans_sid" may be what you
are looking for - this will maintain your session information between
pages whether or not the browser supports cookies.
See
http://uk.php.net/manual/en/ref.sess....use-trans-sid
Louis