<?php
if ($update == "yes") {
$text=stripslashes($_POST["text"]);
$filename='text.txt';
$file = fopen($filename, "w");
fputs($file, $text);
fclose($file);
}
?>
<HTML>
<HEAD>
<TITLE>title</TITLE>
</HEAD>
<BODY>
<FORM METHOD="post" ACTION="<?=$_SERVER_['PHP_SELF']; ?>">
<INPUT TYPE=hidden NAME="update" VALUE="yes">
<TEXTAREA NAME="text" COLS="20" ROWS="12">
<?
include 'text.txt';
?>
</TEXTAREA>
<P>
<INPUT TYPE=submit VALUE="Update Text">
</FORM>
</BODY>
</HTML>
Got this script off somewhere...but i can't get it to work 😕
Once i click update ...the text will revert to the original text....can't edit the text at all
WHY??!?!!
any hints would be most helpful 😃
help a newbie today!