How do I manipulate this php+css variable?

  • Thread starter Thread starter learningPHPscripting
  • Start date Start date
L

learningPHPscripting

Guest
<?php header("Content-type: text/css");
$backgroundcolor = "#00FFFF ";
$textcolor = " #0033FF";
?>
body {
background:<?php echo $backgroundcolor?>;
color:<?php echo $textcolor?>;
}

The variable I want to assign a different value or color to is the one for $backgroundcolor on a separate .php file.

In other words I want to be able to use another .php file to change the color of the $background using this variable?

Currently when I type print $backgroundcolor = "some new color";
in my browser I get the original color for the background $backgroundcolor = "#00FFFF "; working; however, i get text that has "some new color"; also. I just want the new color to be the backgroundcolor not to have "some new color" printed out onto the browser.
 
Back
Top