Re: javascript check

From: Date: Thu, 19 Oct 2000 14:51:37 +0000
Subject: Re: javascript check
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21166@lists.php.net to get a copy of this message
While PHP can tell if you a certain browser is capable of JavaScipt it cannot tell you if Javascript is indeed turned on. The get_browser() function looks to a browscap.ini file on your server. It gets the HTTP_USER_AGENT into and checks it against the file and says, "yes, Netscape 4.5 has javascript support", but that's it. Whether or not its on is unknown. Put the browscap.ini file somewhere on your server, and in the php.ini file, point the browscap to that file. Do a $browser = get_browser(); if ($browser["javascript"]) { some code; } It should return true even if Javascript is turned off in your browser. Hope this helps, Joe

« previous php.general (#21166) next »