Jump to content

CSS and PHP


MightyGoober

Recommended Posts

<?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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.