need some help with code
Posted: Tue Jan 13, 2009 3:37 am
Hi i'm actually trying to modify a script which i downloaded, this is used to detect ie6, and give an error message if so. Here's the script
What i was trying to do is to exit() the website if alert is true. Sorry, this might be simple as hell but i'm not a programmer (more the designer type)... would appreciate some help! thanks
Code: Select all
<?php
// IE6 string from user_agent
$ie6 = "MSIE 6.0";
// detect browser
$browser = $_SERVER['HTTP_USER_AGENT'];
// yank the version from the string
$browser = substr("$browser", 25, 8);
// html for error
$error = "Text to display on Error";
// if IE6 set the $alert
if($browser == $ie6){ $alert = TRUE; }
?>