Hello,
I am creating a social networking site using PHP. I am using templates for the pages. I want to let the users be able to choose the colors they want for their own pages. I am curious on how I can do this using PHP. The only way I can think is to override the styles by embedding them in the page.
Example:
CSS File:
Generated PHP page:Code:body { background-color: #000000; }
I know this is not a good idea, as it will cause pages to be very heavy. Plus I want to keep all my content and styles separate like it should be. Could anyone give me any suggestions for an alternative way?Code:<style type="text/css"> body { background-color: <?php echo $color; ?>; } </style>
Thanks!



Reply With Quote
Bookmarks