Jump to content

HTML FORM to populate some .txt files


edpozek

Recommended Posts

I was to make a basic CMS for a site I am creating. I want the client to be able to update the simple site using a HTML form. Im using the $page=news.txt variable to call my .txt files which in turn is my content for the pages. What I am looking for is a way to use a drop down menu on the form to selct the different .txt pages (news.txt, home.txt, reports.txt) to populate with the title and content areas on the form. This form would have to add an <h1></h1> to the title area and a <p></p> for the content area. Basically a form that dumps into multiple .txt files so he can update it just by navigating to his form.html file on the server.
Link to comment
https://forums.phpfreaks.com/topic/31540-html-form-to-populate-some-txt-files/
Share on other sites

Sorry i guess i left that part out, I don't haver any code yet because all of my experience is in sending an email via my php file on my server with a form. I basically just trying to be pointed in a direction on how I can accomplish this maybe a tutorial or someone who I can stay in contact with while i teach myself.
Im not sure your going to find any specific tutorials on the subject but I suppose you should probably start by learning to read filenames from directories allong with file manipulation with php.

[url=http://hudzilla.org/phpwiki/index.php?title=Working_with_files]This[/url] might get you started, and you can always come back when you get stuck with a specific question.
Thanks Thorpe, I bookmarked that myself

edpozek,

try checking out the php manual for filesystems

[url=http://us3.php.net/manual/en/ref.filesystem.php]http://us3.php.net/manual/en/ref.filesystem.php[/url]

Take a look at the table of contents toward the bottom to find specific functions for working with filesystems.

Nate

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.