news script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Frostbite
Forum Newbie
Posts: 4
Joined: Wed Apr 16, 2003 5:22 am

news script

Post by Frostbite »

i was wondering if anyone could help me with this, its probably really simple but im not sure how to do it

all i need is one text field and a submit button, when you click the sumbit button the content in the text field is put into a file in the same directory called data.txt

could someone help me please?
thanks
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

You need a html form and a php file to process the form (point the form action at processor.php and use POST method).

If you have a textarea field in the form called 'text', the form processor would just write $_POST['text'] to a file.

Do you have a manual? See php.net if not and check out the filesystem functions.
Gappa
Forum Contributor
Posts: 119
Joined: Fri May 23, 2003 10:02 am

Post by Gappa »

there is a tutorial on doing this over at http://www.codewalkers.com
Post Reply