Calling variable from CSS file?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
slipstream
Forum Commoner
Posts: 86
Joined: Fri Apr 19, 2002 8:53 am
Location: Canada

Calling variable from CSS file?

Post by slipstream »

I have this css command:

Code: Select all

body 
{
background-image: 
url(<?php $empName."gif"  ?>); //here
background-repeat: 
no-repeat;
background-position: center right;
&#125;
</style>
and the URL command I want it to show the image. I know empName already has a valid value in it but calling it from this CSS command is tough. Any ideas?

(Admin Edit Note: Thank you for using a BBCode, however, please also ensure that you don't also Disable the BBCode in the post.)
User avatar
releasedj
Forum Contributor
Posts: 105
Joined: Tue Jun 17, 2003 6:35 am

Post by releasedj »

Did you mean:

Code: Select all

<?=$empName."gif"?>
slipstream
Forum Commoner
Posts: 86
Joined: Fri Apr 19, 2002 8:53 am
Location: Canada

Post by slipstream »

Thanks for your help, I got it.. :D
User avatar
releasedj
Forum Contributor
Posts: 105
Joined: Tue Jun 17, 2003 6:35 am

Post by releasedj »

Is this embedded in the HTML document?
User avatar
releasedj
Forum Contributor
Posts: 105
Joined: Tue Jun 17, 2003 6:35 am

Post by releasedj »

Cool
Post Reply