<?xml version="1.0" encoding="utf-8"?>
		<feed xmlns="http://www.w3.org/2005/Atom">
		  <title type="text">SkillShare Forum - CSS Beauty - CSS value to be updated from Database</title>
		  <updated>2013-05-21T20:56:50-04:00</updated>
		  <id>http://cssbeauty.com/skillshare/</id>
		  <link rel="alternate" type="text/html" hreflang="en" href="http://cssbeauty.com/skillshare/discussion/?DiscussionID=67&amp;Focus=427"/>
		  <link rel="self" type="application/atom+xml" href="http://cssbeauty.com/skillshare/discussion/?DiscussionID=67&amp;Focus=427&amp;Feed=Atom"/>
		  <generator uri="http://getvanilla.com/" version="1.1.9">
			 Lussumo Vanilla
		  </generator>
		  <entry>
		<title>CSS value to be updated from Database</title>
		<link rel="alternate" href="http://cssbeauty.com/skillshare/discussion/67/?Focus=426#Comment_426" type="application/xhtml+xml" hreflang="en"/>
		<id>http://cssbeauty.com/skillshare/discussion/67/?Focus=426#Comment_426</id>
		<published>2005-12-19T10:53:41-05:00</published>
		<updated>2013-05-21T20:56:50-04:00</updated>
		<author>
			<name>mehul_19851</name>
			<uri>http://cssbeauty.com/skillshare/account/197/</uri>
		</author>
		<summary type="text" xml:lang="en">
			I have to change the value of  a class defined in CSS depending upon user selection.
For eg.  There is a color picker to change color of a . The color chosen by user gets stored in database. Now i ...
		</summary>
		<content type="html">
			<![CDATA[I have to change the value of  a class defined in CSS depending upon user selection.<br />For eg.  There is a color picker to change color of a &lt;tr&gt;. The color chosen by user gets stored in database. Now i need to retrieve the color code from the Database and modify the class value in CSS file.]]>
		</content>
	</entry>
	<entry>
		<title>CSS value to be updated from Database</title>
		<link rel="alternate" href="http://cssbeauty.com/skillshare/discussion/67/?Focus=427#Comment_427" type="application/xhtml+xml" hreflang="en"/>
		<id>http://cssbeauty.com/skillshare/discussion/67/?Focus=427#Comment_427</id>
		<published>2005-12-19T10:56:28-05:00</published>
		<updated>2013-05-21T20:56:50-04:00</updated>
		<author>
			<name>mehul_19851</name>
			<uri>http://cssbeauty.com/skillshare/account/197/</uri>
		</author>
		<summary type="text" xml:lang="en">
			If anyone has solution for it Can u please  email me on the same on following email id : mehul_19851@rediffmail.com
		</summary>
		<content type="html">
			<![CDATA[If anyone has solution for it Can u please  email me on the same on following email id : mehul_19851@rediffmail.com]]>
		</content>
	</entry>
	<entry>
		<title>CSS value to be updated from Database</title>
		<link rel="alternate" href="http://cssbeauty.com/skillshare/discussion/67/?Focus=428#Comment_428" type="application/xhtml+xml" hreflang="en"/>
		<id>http://cssbeauty.com/skillshare/discussion/67/?Focus=428#Comment_428</id>
		<published>2005-12-19T11:06:25-05:00</published>
		<updated>2013-05-21T20:56:50-04:00</updated>
		<author>
			<name>nifkin</name>
			<uri>http://cssbeauty.com/skillshare/account/3/</uri>
		</author>
		<summary type="text" xml:lang="en">
			Use a PHP script (or whatever server-side language you're using) to generate your CSS dynamically so it can retrieve data like that from the database.
		</summary>
		<content type="html">
			<![CDATA[Use a PHP script (or whatever server-side language you're using) to generate your CSS dynamically so it can retrieve data like that from the database.]]>
		</content>
	</entry>
	<entry>
		<title>CSS value to be updated from Database</title>
		<link rel="alternate" href="http://cssbeauty.com/skillshare/discussion/67/?Focus=433#Comment_433" type="application/xhtml+xml" hreflang="en"/>
		<id>http://cssbeauty.com/skillshare/discussion/67/?Focus=433#Comment_433</id>
		<published>2005-12-19T17:00:47-05:00</published>
		<updated>2005-12-19T17:02:45-05:00</updated>
		<author>
			<name>Sam K</name>
			<uri>http://cssbeauty.com/skillshare/account/39/</uri>
		</author>
		<summary type="text" xml:lang="en">
			&amp;lt;?phpheader('Content-type: text/css');$db = mysql_connect('localhost', 'mysql_user', 'mysql_password');mysql_select_db('database_name',$db);$user = &quot;username&quot;;$sql = &quot;SELECT css ...
		</summary>
		<content type="html">
			<![CDATA[<pre style="color: #800000;" >&lt;?php<br />header('Content-type: text/css');<br /><br />$db = mysql_connect('localhost', 'mysql_user', 'mysql_password');<br />mysql_select_db('database_name',$db);<br /><br />$user = "username";<br />$sql = "SELECT css FROM foo WHERE user=$user"; <br />$result = mysql_query($sql) <br />	or die(mysql_error());<br />$row = mysql_fetch_row($result);<br />$colour = $row[0];<br />?&gt;<br /><br />tr {<br />	color: &lt;?=$colour; ?&gt;;<br />}</pre>Save that as style.php (or whatever), and include it into your document as you would for a normal CSS file.<br />I'm tired so there's probably a bug in that script somewhere. But that should give you a start.]]>
		</content>
	</entry>
	
		</feed>