> Have a problem in reading a text file and displaying it in a text box
> area,also what function should i used to overwrite an existing text file.

For <textarea> type text boxes, use the following -

<textarea>$var</textarea>

Please note that if you  include *any* kind of spaces or tabs or other
characters between the textarea tags that it will dump them into the text
area as well.  i.e. -

    <textarea>
        $var
    </textarea>

The 'action' file of the form will receive the following (unless the
contents are modified of course) - "\n        $var\n    "

For <input> type text boxes, use the following -

<input type='text' value='$var' />

As to reading a file, see Example 1 under fgets().  For deleting files, see
unlink().

Patrick

p.s. you'll want to html encode $var before dumping it into either one of
these or else the contents of $var could mess up the html in the page.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to