MightyGoober Posted July 27, 2008 Share Posted July 27, 2008 <?php header("Content-type: text/css"); include '../game/config.php'; //contians session info include '../game/sql.php'; //conect to sql database if (!$_SESSION['OTS_LOGGED_IN']) { //user is not logged in. $bg = '#C13838'; $clr = '#FEA4A4'; $h_clr = '#C0C0C0'; $textarea_color = '#FED2D2'; $textarea_background = '#872727'; $link = '#DFDFDF'; $inner = '#DFDFDF'; } else { //user is logged in. include '../game/userData_skin.php'; // get custom values from mysql table (same $var names) } ?> /* CSS Document */ body { background-color:<?=$bg?>; color:<?=$clr?>; text-align:left; } h1, h2, h3, h4, h5, h6 { color:<?=$h_clr?>; text-decoration:underline; float:none; text-align:center; } table, tr, td { text-align:left; } input, textarea { color:<?=$textarea_color?>; background-color:<?=$textarea_background?>; } a, a:hover, a:visited { color:<?=$link?>; } .INNER { color:<?=$inner?>; } Yet, on both being logged out AND logged in, I get like a full page of white pretty much, which im going to guess are defualt values. Am i missing something? Link to comment https://forums.phpfreaks.com/topic/116818-css-and-php/ Share on other sites More sharing options...
trq Posted July 27, 2008 Share Posted July 27, 2008 Are you sure you have short tags enabled? I would be using... color:<?php echo $h_clr; ?>; just to be safe. Link to comment https://forums.phpfreaks.com/topic/116818-css-and-php/#findComment-600751 Share on other sites More sharing options...
TheFilmGod Posted July 27, 2008 Share Posted July 27, 2008 Are you sure you have short tags enabled? I would be using... color:<?php echo $h_clr; ?>; just to be safe. <? ?> - short tags are being taken out of PHP 6. I recommend taking them all out for future portability. Link to comment https://forums.phpfreaks.com/topic/116818-css-and-php/#findComment-601109 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.