Gosh! JC, I used $_POST['textbox'] as an example for you. If you wish to end
your lines by "\r\n" instead of "\n" just do it, like here
$file_data = "editdate#".date('l d_m_Y')."\r\n";
And if you have some textareas on your HTML form, you can change them like
$_POST['textbox'] = str_replace("\n
eplace("\n", "\r\n", $_POST['textbox']);
if (fwrite($handle, $file_data) === FALSE)
{
echo "Cannot write to file ($file_location)";
exit;
}
fclose($handle);
} else {
echo "The file $file_location is not writable";
}
}
-
rom: Rosty Kerei [mailto:[EMAIL PROTECTED]]
Sent: 08 November 2005 01:32 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] Re: fwrite()
Maybe you need to replace "\n" to "\r\n"? Like -
$_POST['textbox'] = str_replace("\n", "\r\n", $_POST['t
@lists.php.net
Subject: [PHP-WIN] Re: fwrite()
Maybe you need to replace "\n" to "\r\n"? Like -
$_POST['textbox'] = str_replace("\n", "\r\n", $_POST['textbox']);
Sincerely,
Rosty Kerei
[EMAIL PROTECTED]
""JC Botha"" <[EMAIL
Maybe you need to replace "\n" to "\r\n"? Like -
$_POST['textbox'] = str_replace("\n", "\r\n", $_POST['textbox']);
Sincerely,
Rosty Kerei
[EMAIL PROTECTED]
""JC Botha"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dear Users, thanks for those that helped me last time! I got it
I thought I would display this code in the body of the message, because I
dont want people to worry about the attachment containing a virus. Can't
seem to figure out why this is added blank lines when writing the file.
The DEFAULT case opens the file and loads it into a Form Textarea. CASE 1
then