Posted by Benjamin on 10/11/80 11:59
you use a function called get_browser()
it takes no parameters and anaylzes the HTTP_USER_AGENT
it return an assoctive array
you check "javascript" key and if it is set to 1 then javascript is
enabled
For example:
$results = get_browser();
if ($results["javascript"] == 1) {
echo "You have javascript";
}
One thing you need to now is you must set the browscap.ini in your
php.ini file to the location of you browscap.ini. You can get one at
http://browsers.garykeith.com/downloads.asp
Happy detection
Jim wrote:
> How do I check if javascript is enabled in PHP?
>
> TIA,
>
> Jim
Navigation:
[Reply to this message]
|