Hi all,
For a flat-textfile that contains addresses for a mailinglist I've written a little script, so that I can view the list with e-mails and also edit/remove them from the file. For some reason my changes to the content don't always get saved.... (although there is no direct error that the script would give). Maybe someone can help me out here...
The script/page to view & edit the list/file :
<?php
$amount = exec("wc -l /home/3amp/brizis.list");
echo ereg_replace( " /home/3amp/brizis.list", " ", $amount);
?> subscribers on your list.<br>
<form name="edit" action="save.php" method="post">
<input type="hidden" name="whichcontent" value="brizis.list">
<textarea name="artikelbody" cols="50" rows="10" wrap="soft"><?PHP
include "/home/3amp/brizis.list";
?></textarea><br><br>
<input type="reset" value="WISSEN"> <input type="submit" value="SAVE">
</form>
After clicking on the submit button, one gets forwarded to the file that actually saves the info...
<?PHP
$location = $whichcontent;
$output = stripslashes($artikelbody);
if($file=fopen("/home/3amp/$location", "r+")) {
fwrite($file, $output);
}
?>
Can anyone tell me what I've done wrong? :-/
Thanks,
Stepan