try this:
replace:
Code:
if($_POST['Submit']){
$open = fopen("textfile.txt","w+");
$text = $_POST['update'];
fwrite($open, $text);
fclose($open);
echo "File updated.<br />";
echo "File:<br />";
$file = file("textfile.txt");
foreach($file as $text) {
echo $text."<br />";
}
with
Code:
if($_POST['Submit']){
$open = fopen("textfile.txt","w+");
$text = $_POST['update'];
fwrite($open, $text);
fclose($open);
echo "File updated.<br />";
echo "File:<br />";
$file = file("textfile.txt");
foreach($file as $text) {
echo stripslashes($text)."<br />";
}
Bookmarks