|
-
Sep 28th, 2012, 06:27 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] css with php
hi can anyone help me please i need to change the background of my page everyday, but im having a problem with css.
i understand the you cant use php in a ccs style file
i have tryed a couple of ways but getting know were with this.
PHP Code:
div#header {
color: #9C9CFE;
background: #303030 url(header.jpg) no-repeat;
height: 180px;
width: 100%;
}
i need to change header.jpg ever time, i have tryed
PHP Code:
div#header {
color: #9C9CFE;
background: #303030 url(<?php $picheader;?>) no-repeat;
height: 180px;
width: 100%;
}
but it will not work.
$picheader will have the background pictures path, this will change ever day..
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
-
Sep 29th, 2012, 09:44 AM
#2
Re: css with php
You need to "echo" that value like this:
PHP Code:
div#header {
color: #9C9CFE;
background: #303030 url(<?php echo $picheader; ?>) no-repeat;
height: 180px;
width: 100%;
}
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Sep 30th, 2012, 05:50 AM
#3
Thread Starter
Hyperactive Member
Re: css with php
thanks for your help solved the problem...     
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|