PHP Inputs that hold value for my CSS page
Im not really sure if I am explaining this right, but I want to make my CSS page updatable via a PHP Form with Text inputs, and radio boxes. How does one go about doing this? ANy links or info would be very helpful.
Lemme explain as good as possible. I am thinking that first I will need a form with various inputs that passes values (post/get) to my cs开发者_开发百科s page. But I will need to make sure those values in the php form stick, so the next time I make changes to it, they will have the vaues from my css sheet as well. Would this be best to do with ajax?
What i would do is make a php file called style.php and add on top header("content-type:text/css");
. Fetch information from the database and put it in the css file.
If you have a SSH access you could use nano (pico) to edit the CSS file. Here, http://www.sitepoint.com/forums/showthread.php?t=672977, risoknop gives an example of PHP text editor, using a form to edit a text file. It's on the end of the post.
精彩评论