Page 1 of 1

How to do this!

Posted: Wed Mar 12, 2003 10:43 am
by Raahul
i am thinking. as i can give the initial value of a text area, can the initial value be the text of a text file, if yes how?

And second thing, how do i write something to a text file, the user enters the text in the text area, and when he clicks submit, it overwrites the text file with the user's text. How can i do this?

Posted: Wed Mar 12, 2003 10:48 am
by daven
In the PHP Manual, check out:
fopen()
fread()
fwrite()

They should let you do what you want

Posted: Wed Mar 12, 2003 3:58 pm
by lazy_yogi
And instead of a textarea you might want to use and iframe.
you can have variable widths depending on the size of the browser window which you can't with textareas.