I found an article on Creating a Mailing List Manager with PHP. After uploading the files, I tried creating a new list through the newlist.php3. I am redirected to the makenewlist.php3, where I receive the following error messages:
Warning: fopen(data/lists.txt): failed to open stream: Permission denied in /home/hearnofg/public_html/temp/news/makenewlist.php3 on line 5
Warning: fputs(): supplied argument is not a valid stream resource in /home/hearnofg/public_html/temp/news/makenewlist.php3 on line 6
Warning: fclose(): supplied argument is not a valid stream resource in /home/hearnofg/public_html/temp/news/makenewlist.php3 on line 7
Created new list newsletter.
Here is the newlist code:
<html><head><title>Mailing List Administration</title></head><body>
<br>
<b>Both blanks must be filled in!</b><br>
<form method=post action="makenewlist.php3">
<b>Name of the list:</b><input type=text name="Listname" size="40">
<br><br>
<b>One word description of the list:</b>
<input type=text name="Filename" size="40">
</td><td><table><tr><td valign=top>
<br><br>
<input type="submit" name="Submit" value="Make list">
</form>
<br><br><a href="addnames.php3">Add names to an existing list</a>.
<br><a href="picklist.php3">Edit/Delete names</a>.
<br><br><a href="data/log.txt">View Send Log</a>.
<br>
</body></html>
And here is the makenewlist code:
<html><head><title>Updating file....</title></head><body>
<?
$Filename = $Filename.".lst";
$myfile = fopen("data/lists.txt","a");
fputs($myfile,$Listname."|".$Filename."\n");
fclose($myfile);
?>
Created new list <? echo $Listname ?>.<br>
<br><br><a href="index.php3">Home</a>.
<br><br><a href="addnames.php3">Add names to the list</a>.
<br><br><a href="picklist.php3">Edit/Delete names</a>.
<br><br><a href="data/log.txt">View Send Log</a>.
<br>
</body></html>
What do I need to do to correct this?
Thanks
Rick