Multiple Step Function
Posted: Tue Jun 08, 2004 10:43 pm
I'm setting up an extremely simple CMS system that just writes to a text file on submission. The only problem is, if the update file is executed as it stands now, the $_POST['content'] variable is empty and it effectively deletes the content of the text file. Any Ideas?
Thanks much.
E
Code: Select all
<?
$fn = "update.txt";
$content = stripslashes($_POST['content']);
$fp = fopen($fn,"w") or die ("Error opening file in write mode!");
fputs($fp,$content);
fclose($fp) or die ("Error closing file!");
echo "<meta http-equiv="refresh" content="0; url=../" />\n";
?>E