You are here: Re: How do I check if javascript is enabled in PHP? « All PHP « IT news, forums, messages
Re: How do I check if javascript is enabled in PHP?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация