Getting form results and adding them to a htm file
| From: | Todd Williamsen | Date: | Sun, 25 Nov 2001 21:11:17 +0000 |
| Subject: | Getting form results and adding them to a htm file | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-10628@lists.php.net to get a copy of this message | ||
I have a WYSIWYG editor on a website so that my client can update one web
page. Now the form has one text field where all the data is entered into.
That text field name is "EditorValue" I created the following script to
update the html page which is called "news.htm"
<?php
$filename = "news.htm";
$fp = @fopen ($filename, "w+") or die ("Could not open File");
$newstring = "$EditorValue";
fwrite ($fp, $newstring);
fclose($fp);
?>
I get the "Could not open File" message, which means that it cannot open the
file. I checked the permissions and the CHMOD is 777, so that shouldn't be
the issue. What is my problem?
Thanks