PHP: Having Trouble

liunx

Guest
<?php

if ($name = strstr ($HTTP_USER_AGENT, "MSIE")) {
Header ("Location: <!-- m --><a class="postlink" href="http://webtastic.abey-tech.net/ie">http://webtastic.abey-tech.net/ie</a><!-- m -->"); }
else {
Header ("Location: <!-- m --><a class="postlink" href="http://webtastic.abey-tech.net/else">http://webtastic.abey-tech.net/else</a><!-- m -->");
}

?>

This code will redirect a user to a certain page if they have MSIE and another if they dont. It doesn't work at all, all I get is a blank page. What's wrong?well not really. best bet is to use ereg()



<?php
$br = strtolower($HTTP_USER_AGENT);
if (ereg("msie",$br )) {
Header ("Location: <a href=http://www.htmlforums.com/archive/index.php/"http://webtastic.abey-tech.net/ie" target="_blank">http://webtastic.abey-tech.net/ie</a>"); }
else {
Header ("Location: <a href=http://www.htmlforums.com/archive/index.php/"http://webtastic.abey-tech.net/else" target="_blank">http://webtastic.abey-tech.net/else</a>");
}

?>Thanks once again for the help their scoutt.sureI really appriciate your help on all my PHP topics.
 
Back
Top