I'm working on a pretty simple page for my "internship." I can't go into much detail, but I can say that it involves sheep, lasers, and everything you've ever wanted. Anyways, I'm trying to get it so that the background changes depending on whether the sun is out or not. I have a function working properly to determine whether it is daytime or not, but I can't get it to display the images.
I've never used CSS before, let alone mixed it with PHP, so I'm pretty sure the issue is this block of code here:
<style type="text/css">
body
{
background-image: url(
<?php if( day() == 1 ) { ?> 'day_sheep.jpg'); <?php }
else { ?> 'night_sheep.jpg)'; <?php } ?>
background-position: 50% 50%;
background-repeat: no-repeat;
}
</style>