jdrasq Posted July 21, 2007 Share Posted July 21, 2007 Hello, If I have a database for example with style, heading and content, where the style would be one of a b or c, then is it possible to have in the page code when loading the item to use the css style defined? Thank you, JDRasq Link to comment https://forums.phpfreaks.com/topic/61106-solved-css-style-from-a-mysql-database/ Share on other sites More sharing options...
AndyB Posted July 21, 2007 Share Posted July 21, 2007 Yes. Retrieve the values from the database before the head of the page, and then echo out your CSS line ... <?php echo '<link rel="stylesheet" media="screen" href="'. $style. '.css" type="text/css" />';?> Link to comment https://forums.phpfreaks.com/topic/61106-solved-css-style-from-a-mysql-database/#findComment-304092 Share on other sites More sharing options...
jdrasq Posted July 21, 2007 Author Share Posted July 21, 2007 thank you Link to comment https://forums.phpfreaks.com/topic/61106-solved-css-style-from-a-mysql-database/#findComment-304093 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.