Results 1 to 3 of 3

Thread: [RESOLVED] css with php

  1. #1
    Addicted Member
    Join Date
    Jun 07
    Posts
    251

    Resolved [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;
        
    height180px;
        
    width100%;

    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: athlon 3000 with 1gb memmory and 500g harddrive. running xp pro and vb6..
    media centre xp pc: 3gb memory,athlon 3000+, test pc..
    media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
    minivault: server 2008 with remote login, 2gb memory, atom 330 dual core, 6tb harddrive and local web host
    atomvault 1: server 2008, atom 330 with 4 gb memory, 21TB hardrive space. backing up and storage centre..
    check out my builds http://AtomVaults.yolasite.com

    moving from vb6 to vb.net 2010
    learning vb.net and php + mysql

    I WISH THERE WAS MORE TIME IN THE DAY

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 08
    Location
    Trivandrum, Kerala, India
    Posts
    7,559

    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 Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  3. #3
    Addicted Member
    Join Date
    Jun 07
    Posts
    251

    Re: css with php

    thanks for your help solved the problem...
    programming pc: athlon 3000 with 1gb memmory and 500g harddrive. running xp pro and vb6..
    media centre xp pc: 3gb memory,athlon 3000+, test pc..
    media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
    minivault: server 2008 with remote login, 2gb memory, atom 330 dual core, 6tb harddrive and local web host
    atomvault 1: server 2008, atom 330 with 4 gb memory, 21TB hardrive space. backing up and storage centre..
    check out my builds http://AtomVaults.yolasite.com

    moving from vb6 to vb.net 2010
    learning vb.net and php + mysql

    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
  •