Because there a many users still using Internet Explorer which is known to not be fully compatible with some Javascript or some other things a user using Internet Explorer can be handled differently. But we need to know when a client is using MSIE. This can be easily done using PHP. A client accessing your website has a USER AGENT; this is saved in global variable $_SERVER.
We save USER_AGENT in $user_agent variable and display it.
Internet Explorer has in USER_AGENT text MSIE – Microsoft Internet Explorer. So we need to check if our variable has MSIE text in it.
?>
You can play with other browsers and see the result of USER_AGENT. After that add it to an if else statement if you need.
Leave a Reply