homepage Welcome to WebmasterWorld Guest from 50.16.17.90
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library : Charter : Moderators: coopster & eelixduppy & jatar k

PHP Server Side Scripting Forum

    
dynamic style sheets from DB
mikejs




msg:4022307
 10:57 am on Nov 10, 2009 (gmt 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

 

JohnCanyon




msg:4022467
 4:47 pm on Nov 10, 2009 (gmt 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'];

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved