Re: The CSS battle continues...

From: Date: Thu, 24 Oct 2002 16:37:49 +0000
Subject: Re: The CSS battle continues...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121309@lists.php.net to get a copy of this message
Maybe you already realized this, but just in case... you're trying to write that Stylesheet.php script as if it were going to be include()-ed into your script, but you're not calling it that way. The variables $databasesource, $page, $code, etc. aren't available to you in Stylesheet.php because with that <link> tag, there's a separate request made just for Stylesheet.php. You'd have to do something like: <link rel="stylesheet" type="text/css" href="Stylesheet.php?databasesource=<?=$databasesource?>&..."> "Liam Gibbs" <Liam.Gibbs@dfait-maeci.gc.ca> wrote in message news:D64360C926B9F34F8B35F78D07B8E7A2716D18@postman.dfait-maeci.gc.ca... > No, it still doesn't work. I tried putting in my css straight into the > browser. The proper stuff comes up, but when I use it in my LINK tag, it > still does the same junk. Unless I make it embedded in a STYLE tag, but I > don't want to do that. > > > > > > > > > > ========================= > > > > > > <?PHP > > > print("BODY { Color: #FFFFFF; Background-Color: #000000; > > > Text-Align: > > > > > Justify; Scrollbar-Base-Color: #005500;\n"); > > > print("TD { Padding-Left: 5px; Padding-Right: 5px; }\n"); > > > print("A { Color: #FF0000; Text-decoration: None; Font: Bold; > > > Font-Family: Schoolbook; }\n"); > > > print(".regular { Text-Align: Justify; }\n"); > > > print(".title { Color: #FFFFFF; Background-Color: #000000; > > > Text-Align: Center; Font: Bold; Line-Height: 3em; }\n"); > > > print(".header { Color: #FFFFFF; Background-Color: #000000; Font: > > > Bold; }\n"); > > > print(".bulletin { Color: #FFFFFF; Background-Color: #000000; Color: > > > > > #0000FF; }\n"); > > > print(".fineprint { Color: #FFFFFF; Background-Color: #000000; > > > Font-Size: X-Small; }\n"); > > > print(".error { Color: #FF0000; Background-Color: #000000; > > > Text-Align: Center; }\n"); > > > print(".confirmation { Color: #FFFFFF; Background-Color: #000000; > > > Text-Align: Center; Font: Bold; }\n"); > > > print(".footer { Color: #FFFFFF; Background-Color: #000000; > > > Font-Size: X-Small; }\n"); > > > if(($page == "Grate") && ($code != "") && > > > ($method != "")) { > > > if(($connection = @mysql_connect("localhost", "root", > > > "")) > > && > > > (mysql_select_db($databasesource))) { > > > $query = mysql_query("SELECT Formatting FROM method > WHERE > > > Code='$code'"); > > > if($result = mysql_fetch_row($query)) { > > > $components = explode($result[0], ","); > > > print("P { Color: #$components[0]; > > > Background-Color: #000000; Text-Align: Justify; Text-Indent: 10px; > }\n"); > > > print(".method-title { Color: > > > #$components[1]; Background-Color: #000000; Text-Align: Center; }\n"); > > > print(".method-majorbreak { Color: > > > #$components[2]; Background-Color: #000000; Text-Align: Justify; }\n"); > > > print(".method-minorbreak { Color: > > > #$components[2]; Background-Color: #000000; Text-Align: Center; }\n"); > > > print(".method-footnotereference { Color: > > #$components[3]; > > > Background-Color: #000000; Font-Variant: Superscript; }\n"); > > > print(".method-footnote { Color: > > > #$components[4]; Background-Color: #000000; }\n"); > > > } > > > @mysql_close($connection); > > > } > > > } > > > ?> > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.general (#121309) next »