dave_c00
31 Oct 2006, 07:07 AM
I have a site by where i want to pass a different variable into a css file depending upon the page.
Currently i am using:-
<?
$pgcolor="#000000";
?>
<link href="style.php?pgcolor=<? echo $pgcolor;?>" type="text/css" rel="stylesheet">
and then within the css file style.php am using:-
<?php
header("Content-type: text/css");
$pgcol= $_GET['pgcolor'];
?>
body { color:<?=$pgcol?>; }
<?
?>
This isnt working for me.. Is there a way of doing it?
Thanks
Currently i am using:-
<?
$pgcolor="#000000";
?>
<link href="style.php?pgcolor=<? echo $pgcolor;?>" type="text/css" rel="stylesheet">
and then within the css file style.php am using:-
<?php
header("Content-type: text/css");
$pgcol= $_GET['pgcolor'];
?>
body { color:<?=$pgcol?>; }
<?
?>
This isnt working for me.. Is there a way of doing it?
Thanks