CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
IBM developerWorks
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 10th, 2003, 05:25 AM
edph edph is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: ksa
Posts: 11 edph User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 25 sec
Reputation Power: 0
Send a message via Yahoo to edph
calling a php file instead of css to specify stylesheet

I wonder if this will work...
the link is pointing to a php file which pulls out the style from the database instead of a regular css file...

index.html
Code:
<html>
<head>
<link rel='stylesheet' href='css.php' type='text/css'>
</head>
<body>
<!--html code here -->
</body>
</html>


where css.php contains this
Code:
PHP Code:
<?php 
//check for cookies... 
if isset($_COOKIES['style']) { 
 
$style $_COOKIES['style']; 
 
$css our_style($style); 

else { 
$css our_style('0'); } //your default style on the database 
function our_style($style) { 
 include 
"database_connection.php"// database connection script  
$exec mysql_query("SELECT text FROM styles WHERE id='$style'"); 
 
$output mysql_fetch_array($exec); 
 return (
$output); 

echo 
$css
?>


The database contains the styles... hmnnn...

Reply With Quote
  #2  
Old August 10th, 2003, 08:44 AM
nopoints nopoints is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Windsor ON, Canada
Posts: 459 nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 44 m 22 sec
Reputation Power: 8
try it.
__________________
Programmer's Corner

Reply With Quote
  #3  
Old August 10th, 2003, 09:30 AM
sde sde is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 36 sde User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 26 m 29 sec
Reputation Power: 5
php is a beautiful thing

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > calling a php file instead of css to specify stylesheet


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway