Can someone maybe help me out?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Tasmanian Devil
Forum Newbie
Posts: 2
Joined: Fri Jul 25, 2003 10:36 am

Can someone maybe help me out?

Post by Tasmanian Devil »

I am looking for a php to be able to search the users computer to see if cookies and/or javascript enabled. If one or both are disabled, I want the user to go to one page, but if both enabled, to go to another page

Thanks :?:
atari900
Forum Newbie
Posts: 3
Joined: Fri Jul 25, 2003 3:22 pm

Post by atari900 »

You can use get_browser() to get the javascript information.

http://us2.php.net/function.get-browser

You can also check and see if people have cookie capable browsers, but the only way I know of to check if they are actually enabled is to use set_cookie() and then reload the page and check for a value. If there is no value then cookies aren't enabled. You can then use
header("Location: /path/to/file.php");
to refresh your browser, and or redirect to another page.
Post Reply