Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.
<?phpSave that as style.php (or whatever), and include it into your document as you would for a normal CSS file.
header('Content-type: text/css');
$db = mysql_connect('localhost', 'mysql_user', 'mysql_password');
mysql_select_db('database_name',$db);
$user = "username";
$sql = "SELECT css FROM foo WHERE user=$user";
$result = mysql_query($sql)
or die(mysql_error());
$row = mysql_fetch_row($result);
$colour = $row[0];
?>
tr {
color: <?=$colour; ?>;
}
1 to 4 of 4