Re: [PHP] fopen and fwrite r+

2007-01-13 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-13 17:32:00 -0500: > I can write to the bottom of the file, no problem, but if I want to > put new entries at the top of the file I have problems: > the previous entry is partially overwritten and mangled.. you cannot prepend to a file. to do that you need to creat

[PHP] fopen and fwrite r+

2007-01-13 Thread Richard Kolseth
I'm collecting data from a form and using it to write to a flat file like so: Quote: //this removes line breaks in an text field box and substitutes double breaks $postbody = str_replace("\r\n", "",$postbody); $thepost = "$postitle | $postdate | $postbody | $author \r\n"; if ($posttype=="add"