How to do this!

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
Raahul
Forum Newbie
Posts: 6
Joined: Sat Mar 08, 2003 5:40 am

How to do this!

Post 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?
User avatar
daven
Forum Contributor
Posts: 332
Joined: Tue Dec 17, 2002 1:29 pm
Location: Gaithersburg, MD
Contact:

Post by daven »

In the PHP Manual, check out:
fopen()
fread()
fwrite()

They should let you do what you want
User avatar
lazy_yogi
Forum Contributor
Posts: 243
Joined: Fri Jan 24, 2003 3:27 am

Post 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.
Post Reply