Results 1 to 2 of 2

Thread: write to file

  1. #1
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default write to file

    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.
    Last edited by TheJoshMan; 11-29-2008 at 07:33 PM. Reason: figured it out on my own.
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  2. #2
    Join Date
    Sep 2008
    Posts
    56
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •