1

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 css 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?

3
  • "I want to make my CSS [file] updatable via a PHP Form" - could you explain why?
    – thirtydot
    Feb 28, 2011 at 1:41
  • I am going to be adding a lot of elements to it, and it would be much easier to do it this way. Feb 28, 2011 at 1:54
  • Why AJAX anyways? You would be looking for a database or something, right?
    – JCOC611
    Feb 28, 2011 at 2:02

2 Answers 2

0

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.

-1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.