- PHP: Select all
function getCSS($style)
{
if (isset($_COOKIE[$style]))
{
$css = $_COOKIE[$style];
}
else
{
$css = "red";
}
return $css;
}
above is a function in my index which is called in order to select * colour schemes that AREN'T that
css. Then, each alternative
css is created - followed by the used alternative
css, and the overall sheet.
Quote:
$query = mysql_query("SELECT * FROM baby_colourscheme WHERE colo_css != '".getCSS("style")."'");
while ($row = mysql_fetch_array($query))
{
print "<link rel=\"alternate stylesheet\" type=\"text/css\" href=\"styles/".$row['colo_css'].".css\" title=\"".$row['colo_css']."\" /><br />";
}
?>
<link rel="stylesheet" type="text/css" href="styles/style.css" />
<link rel="stylesheet" type="text/css" href="styles/<?php print getCSS("style"); ?>.css" title="<?php print getCSS("style"); ?>" />
<link rel="shortcut icon" href="icons/red.ico" type="image/x-icon"/>
<link rel="icon" href="icons/red.ico" type="image/x-icon"/>
|