Forum Moderators: coopster
I am trying to make a mailing list that stores all the people who subscribe into a text file, Thats done, mainly becuase i dont have any mysql databases, i would like to use phplist but cant. I have a current subscribers page here
[code]<h1>Current Subscribers To the Email List</h1>
<script type="text/javascript">
function CopyToClipboard()
{
CopiedTxt = document.selection.createRange();
CopiedTxt.execCommand("Copy");
}
</script>
<p><form name="select_all"><input type="button" value="Select All" onClick="javascript:this.form.subscribers.focus();this.form.subscribers.select();"> <input type="button" onClick="CopyToClipboard()" value="Copy To Clipboard" /> <input id="Save" type="button" value="Save Changes" onclick=""/>
<br /><br />
<textarea name="subscribers" cols="40" rows="20"><?php include("emaillist.txt"); ?></textarea>
</form>[code]
It displayes a textarea with the contents of the text file in it. All good, but i added a button that is called save and i want to make it so when its clicked, any changes to the text area are written back to the text file, so i can manage the list from that page, remove email addresses etc.
Can someone get me started on that function please,
Write the contents of the textarea to the textfile emaillist.txt when the button Save is clicked.
Thank you.