#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    07930
    Posts
    60
    Rep Power
    12

    Question dynamic css creation


    alright... planning to create a personal site/page as soon as these impossible exams are over... and one of my insane ideas calls for this...

    is it possible for a php program to create a css script? could the colors, etc be stored in a mysql database?

    i'd like to have a site which has colors which change according to the season and time of day... also i guess it would be a good idea to cache the css script if i do have one created, just to save server cpu time.....

    any ideas? thanks for any suggestions.
  2. #2
  3. Here, not there
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    312
    Rep Power
    12
    The answer is yes, as long as you know how to use PHP to create a text file. Alternatively you could embed the css directly within the HTML file. Yes also to storing values in a DB, if you really want to go that way. You are correct that cacheing the file will improve performance.

IMN logo majestic logo threadwatch logo seochat tools logo