ok, for my site, i use div tags, and if the user doesnt have an updated explorer, some of the tables overlap a bit, not a huge deal, but with this script i am letting the user know of the problem. how can i get this script to only show once, and not everytime the user clicks a link..

<?
//check IE 1,2,3,4,5
$check1 = strpos($HTTP_USER_AGENT, "IE 1");
$check2 = strpos($HTTP_USER_AGENT, "IE 2");
$check3 = strpos($HTTP_USER_AGENT, "IE 3");
$check4 = strpos($HTTP_USER_AGENT, "IE 4");
$check5 = strpos($HTTP_USER_AGENT, "IE 5");
if($check1 || $check2 || $check3 || $check4 || $check5 == true){
echo("
<script language=\"VBScript\">
MsgBox \"Your Internet Explorer does not seem to be up to date, 

because of this you may experience some overlapping when viewing the 

site.\",48,\" HazardNet.Net\"
</script>
");
}
?>

    It would be easier to just make a javascript function to detect the browser type. Then if the browser type is not IE 1,2,3,4, or 5, then give an alert. After that, put the function into the header tags.

    Then in the body tags have an onLoad call the function.

      you could set a cookie on entering the site.

      check for the cookie on each page.

      If it's set, then don't show the error, if it's not set, then throw up the error.

        i'm not sure how to use cookies, i've looked at the info on it, didnt really understand it.

        ummm
        setcookie("$check", check); <--to set the cookie... obviously

        then to check each page:

        if(isset($check)){
        include("IEvCheck.php);}
        else{}

        would that work?

          if(!isset($HTTP_COOKIE_VARS["b_check"]))
          {
          setcookie("b_check", "Browser");
          
          echo("<script language=\"VBScript\">MsgBox \"Your Internet Explorer does not seem to be up to date,because of this you may experience some overlapping when viewing the site.\",48,\" HazardNet.Net\" </script> ");
          
          }
          

          That should work for you. Just put that at the top of each page.

            Write a Reply...