Change background color

I would like to have the background color change based on if a certain file is loaded. I think that this can be done with the “IF” statement and echo but I am not sure on how to write this.

Any help would be appreciated

one method

<?php
      $bg='red';
      if( $bg='red')
     {	$bg_color= "#FF0000";	} 
?>
 
<body bgcolor="<?php echo $bg_color; ?>"> 

Method 2

[code]<?php
if( $bg=‘red’)
{ $bg_color= “#FF0000”; } ?>

[/code]

Sponsor our Newsletter | Privacy Policy | Terms of Service