Page 1 of 1
Writing to an HTML document?
Posted: Fri Jan 16, 2004 10:36 am
by joetheeskimo5
This may seem like very basic stuff to you guys, but I'd like to know simply how to write to an HTML document. Basically, I'd like to take some text a user entered and to display it on a certain page. When they clicked "Submit", they would be re-directed to that page and see their submitted text displayed at the top of the page.
Thanks if you can help.
Posted: Fri Jan 16, 2004 10:45 am
by JayBird
Posted: Fri Jan 16, 2004 10:45 am
by DuFF
You will have open the HTML file (or create one if it's not already created), write the text you want and then close it. Here are some functions that will help you out:
fopen -- Opens file or URL
fwrite -- Binary-safe file write
fclose -- Closes an open file pointer
Heres a tutorial that shows you how to use these functions:
http://www.somethingleet.com/forum/arti ... e&artid=63
Posted: Fri Jan 16, 2004 10:46 am
by JayBird
i don't think he actually want to write a file, he just wants to display entered form information.
I think he just used the wrong wording.
Mark
Posted: Fri Jan 16, 2004 10:49 am
by DuFF
Ohhh, well just in case he wants to do it a much harder way he can write to the file then display it
Ignore my post, just read that link that Bech gave ya.
Posted: Fri Jan 16, 2004 4:35 pm
by joetheeskimo5
Thnx Bech, that helped a lot.
Joe