I'm having an issue with this PHP browser-specific alert
<p>Im currently coding a design tutorial site for developers and I have a snippet of code that basically throws a small alert on the page if the end-user is using an outdated version of IE on the screen. </p>

<p>As useless as it sounds, it's what the client wants. Oh well. </p>

<p>Basically, I can't get the damn this to close when you click the "Close this box" link. Here is the code. Any suggestions? </p>

<pre><code>&lt;?php

// IE6,7,8 string from user_agent
$ie6 = "MSIE 6.0";
$ie7 = "MSIE 7.0";
$ie8 = "MSIE 8.0";

// detect browser
$browser = $_SERVER['HTTP_USER_AGENT'];

// yank the version from the string
$browser = substr("$browser", 25, 8);

// html for error
$error = "&lt;div class=\"error\" id=\"error\"&gt;&lt;strong&gt;Alert:&lt;/strong&gt; It appears that you    
are using Internet Explorer 6, 7, or 8.  While you may still visit this website we 
encourage you to upgrade your web browser so you can enjoy all the rich features this 
website offers as well as other websites. Follow this link to &lt;a 
href=\"http://www.microsoft.com/windows/downloads/ie/getitnow.mspx\"&gt;&lt;strong&gt;Upgrade 
your Internet Explorer&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class=\"kickRight\"&gt;&lt;a href=\"javascript: 
killIt('error');\"&gt; Close This Box&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;";

// if IE6 set the $alert 
if($browser == $ie6){ $alert = TRUE; }
if($browser == $ie7){ $alert = TRUE; }
if($browser == $ie8){ $alert = TRUE; }

?&gt;
</code></pre>

<p>And then you add this into the BODY wherever you may want it: </p>

<pre><code>&lt;!-- IE6 Detect Advise Notice --&gt;
&lt;?php if($alert){ echo $error; } ?&gt;
&lt;!-- // end IE6 Detect Advise Notice --&gt;
</code></pre>

<p>I can't get the damn this to close. I don't know what the problem is. It may be the there is javascript trying to close a PHP error box. I don't know c-based languages so I don't know. Any help is appreciated </p>
