PHP beginner |
|
me wijzig script doet het niet
deze error heeft hij aan writing=Error
<script language="JavaScript">
var home_load:LoadVars = new LoadVars();
home_load.onLoad = function(success){
home_txt.htmlText = "&home_content=" + this.home_content;
}
home_load.load("berichten.txt");
home_save.onRelease = function () {
input = home_txt.htmlText;
loadVariablesNum("edit.php", 0, "POST");
if(this.writing=="Ok") {
status.text = "De tekst is opgeslagen."
}
else status.text = "Error!"
}
</script>
<?php
$home = $_POST['input'];
$toSave = $home;
$fp = fopen("berichten.txt", "a");
if(fwrite($fp, $toSave) != false) echo "writing=Ok";
else echo "writing=Error";
fclose($fp);
?>
<script language="JavaScript"> var home_load:LoadVars = new LoadVars(); home_load.onLoad = function(success){ home_txt.htmlText = "&home_content=" + this.home_content; } home_load.load("berichten.txt"); home_save.onRelease = function () { input = home_txt.htmlText; loadVariablesNum("edit.php", 0, "POST"); if(this.writing=="Ok") { status.text = "De tekst is opgeslagen." } else status.text = "Error!" } </script> <?php $home = $_POST['input']; $toSave = $home; $fp = fopen("berichten.txt", "a"); if(fwrite($fp, $toSave) != false) echo "writing=Ok"; else echo "writing=Error"; ?>
Hoe kan ik het oplossen ?
|