Welcome to WebmasterWorld Guest from 54.225.56.78

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

dynamic style sheets from DB

     
10:57 am on Nov 10, 2009 (gmt 0)

New User

5+ Year Member

joined:Oct 29, 2009
posts:27
votes: 0


Hi I would like to see if it is possible to have a database store css file sheets

e.g.

style1.css
style2.css

etc

then have a user id linked to a style

ID
username
password
style

thne basicaly when the page loads it will run a query and use the css sheet that matches the user

is there a way of having a difrent css loaded into a page ?

thanks

M

4:47 pm on Nov 10, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 10, 2004
posts:126
votes: 0


Mikejs,

This is possible, just reference a php script to output your css instead of writing a .css file to the system.

<link rel="stylesheet" href="/pathtomyscript.php?css=1" />

//output of script...
header("Content-type: text/css");

//output the css
echo $result['css'];

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members