[thelist] Edit textfiles in textareas?
Ken Moore
cor412 at hotmail.com
Fri Sep 26 22:29:41 CDT 2003
Marc,
I did that - think. All that did was to put "$textfildvar", in my case
"$file_contents", into the textarea. See below for the entire page source.
>Hi Ken,
>
><textarea>$textfilevar</textarea>
>
>When the form is submitted, have the contents rewritten to the text file
>and saved.
>
>regards.
>-marc
PAGE SOURCE
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$fp = @fopen ("myfile.txt", "r");
if ($fp)
{
echo "OK 5";
$file_contents = implode("", file("myfile.txt"));
echo $file_contents;
mail("ken at abqnets.com", "Your Message", $file_contents."\n\n\nThis email
was completed and sent successfully.");
}
else
{
echo "Oh, no";
}
?>
<form name="form1" method="post" action="">
<textarea>$file_contents</textarea>
</form>
</body>
</html>
END PAGE SOURCE.
Ken
_________________________________________________________________
Instant message during games with MSN Messenger 6.0. Download it now FREE!
http://msnmessenger-download.com
More information about the thelist
mailing list