Currently I have PHP code that runs a server side check on your browser (placed above 
the <html> tags) and assigns a certain CSS stylesheet to it. The problem I have with 
the current code is it only goes by the browser and not both the browser and platform. 
I have the source code (listed below) that shows what the selector does. I was 
wondering if any of you could take a look at this and give some suggestions to have it 
run multiplatform (Windows and Mac) and have stylesheets for each like ie_win.css for 
IE on Windows and ie_mac.css for IE on Mac and so on. Thanks :)


<?php
$browser = getenv("HTTP_USER_AGENT");
if (preg_match("/MSIE/i", "$browser")) {
        $css = "<link rel="stylesheet" href="ie_win.css" type="text/css">";
} elseif (preg_match("/Mozilla/i", "$browser")) {
        $css = "<link rel="stylesheet" href="ns4_win.css" type="text/css">";
} if (preg_match("/Mozilla\/5.0/i", "$browser")) {
        $css = "<link rel="stylesheet" href="ns6_win.css" type="text/css">";
} elseif  (preg_match("/opera/i", "$browser")) {
        $css = "<link rel="stylesheet" href="op_win.css" type="text/css">";
}
?>



-- 

_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


Have you downloaded the latest calling software from Net2Phone? Click here to get it 
now!

http://www.net2phone.com/cgi-bin/link.cgi?157




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to