Forum Moderators: mack
I then want to be able to send monthly newsletter to all addresses (also to have remove me from list function, hopefully - this could be manual if it is complex).
I am very novice webmaster - simplicity or exising code is the key for me.
I have searched the board for these topics with no luck, I would be very grateful if someone could explain the simplist way to do this.
Many thanks
Sham
[edited by: Woz at 1:22 am (utc) on Jan. 14, 2005]
[edit reason] No self URLs please, see TOS#13 [/edit]
This can easily be done with PHP and MySQL.
First create a MySQL database with the fields (for instance):
signin_id
firstname
email
Just create a simple form where you can fill in your name and e-mail address. The action refers to signin.php (for instance). When they click on the submit button they will see a page with the text that they have been succesfully signed in.
The file signin.php gets the data from the filled in input fields and writes them in your MySQL database. After that send an e-mail to the filled in e-mail address to confirm that he/she has succesfully signed up. In the e-mail should also be a link where people can click on if they want to sign out.
I recommend to only put a sign out link at the bottom of the page in the confirmation e-mail and your newsletter. On your website you only put a form to sign in.
When people click on the link a page will be openend with the question if they want to sign out. You can also make sure they are immediately signed out when they click on the link. But it could happen somebody accidently clicks on the link. On this page you have 2 buttons, "yes, i want to sign out", "no, i don't want to sign out". When they click on "yes" their data will be deleted from the MySQL database and they will receive a confirmation that they have been succesfully signed out. The page they will see next is a page with the text that they have been succesfully signed out. When they click on "no", you could redirect it to your homepage.
When you want to send your monthly newsletter, you could do it with PHP or with an e-mail program. I use HotCast Mass Mailer. You can send plain text or HTML e-mail. The great thing about this is that you can personalize your newsletter, because you have e-mail addresses and the name that belongs with it.
Good luck!
Anand
[edited by: mack at 9:17 am (utc) on Jan. 16, 2005]
[edit reason] See sticky. [/edit]