I want to make sure I send the right stylesheet for the OS. It works on the offsite hosting service but not on my local server. I am running Apache 2 and PHP 4.2.2 I printed out the hosting server PHP info and compaired it to mine but mine does not contained the Apache Environment section, why, and how can I add this section to my PHP.INI? If you will please also post the answer here, but send me a copy to cri@cri-business-solutions.com. The web site is http://www.ccscmh.org that I am using this php code on.
// check which operation system is being used and
// call the apporate style sheet for that system
$operating_system = getenv("HTTP_USER_AGENT");
// use the $operating_system variable to select which operating system is
// being used by the user and select which style sheet to inport
if (preg_match("/Win/i", "$operating_system")) {
$style = "./templates/stylesheet_windows.css";
$exmplmenu_var ="./templates/exmplmenu_var.js";
} else if (preg_match("/Linux/i", "$operating_system")) {
$style = "./templates/stylesheet_linux.css";
$exmplmenu_var ="./templates/exmplmenu_var_linux.js";
} // end if (preg_match("/Win/i", "$agent"))