PDA

View Full Version : how to write to an html file with a form


hazydan
08-20-2002, 02:22 AM
to make my site 'user friendly' im basically wondering how to set up a form for another webmaster where he puts in, for example, his name, the date, and a message, and this is added to the site's main page in a specific style and format. i have perl and php, no mysql that i know of. thanks.

hazydan
08-20-2002, 07:54 PM
no help? :(

The Wizzard
08-20-2002, 08:17 PM
Well that is possible with PHP, but it would involve the use of mysql.

hazydan
08-21-2002, 01:28 AM
ok..i'll look into getting mysql. in the meantime, can you tell me how to do it?

MrNonchalant
08-21-2002, 07:37 AM
The Wizzard: Not necessarily, you can achieve a primitive but functioning version with a .txt file.

The Wizzard
08-21-2002, 04:22 PM
Ya I suppose your right...

hazydan, I can write you the script, just give me a little time, im busy with another thing, I should have it done in a few hours.

Later.

The Wizzard
08-21-2002, 05:47 PM
Okay, its done...

Just download the zip, it includes form.php and message.txt

The persons name, date, and message are added to the text file, and thats it :)

After you fill out the form, and hit submit, go to message.txt and it should be added.

Then you can just include it on your main page.

Dont forget to CHMOD the textfile to 666

Good Luck!

http://www.junglefly.com/hazydan.zip