Log in

View Full Version : Resolved write to file



TheJoshMan
11-29-2008, 06:33 PM
I want to use includes on pages to keep the content fresh and easy to maintain. I had originally thought that the easiest way would be to simply include text files and use a web form to "write/rewrite" the contents of the text file... However, would it work if I were just to use a web form which would post each form field's data to a variable and then somehow echo that variable into the particular spots on the page I want it to display?

This site will be a static site, but it needs the ability to be easily updated by the client. That's why I was thinking of using a web form so they could update it themselves without having to know anything about coding.

I guess what I need is a very very very basic/simple cms type functionality. Is this hard to achieve?


Edit: I figured it out... Nevermind.

maneetpuri
12-01-2008, 09:44 AM
Hi,

As you said that using web form you can write the content in a text file and include it in the pages to show it, you can do it and it will solve the purpose. But I would suggest to keep extension of such filed as PHP or ASP or cgi or pl etc (depending upon the language you are using) as it will be helpful for you in the future.

Storing the content in the variables will not be a good idea and you will also not be able to manage them using web forms. Rather the best is to store it in a database table and call the content from the database, this is the best approach rather better then include files.

Hope this makes sense to you!

Cheers,

~Maneet
Lexolution IT Services
Web Development Company (http://www.lexolutionit.com)