
March 23rd, 2002, 09:26 PM
|
 |
Introspective
|
|
Join Date: Nov 2001
Location: London, UK
|
|
|
You could use PHP's file maniupulation functions to open and read the contents of your .css, and then use regexps to parse those contents, making any alterations you want - and then rebuild the file. BUT don't forget that this will affect all users who are viewing pages which <link> this .css file in... maybe that's your intention. I don't know.
Probably the fastest method would be to use some client-side DHTML, so if you have an input box, say, with an id of "myInput", you could send up a javascript array of variables produced by your PHP, and then adjust it's style properties like this:
document.getElementById("myInput").style.selector =value
where selector might be 'color'
value could be "blue"
If you do it this way, other people looking at the pages will still get the original style definitions until they run a db query and a new one is set.
Not sure if that's any help,
Hope so
Christo
__________________
This is me: http://chris.uk.com
|