php unsubscribe e-mail

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lxm
Forum Newbie
Posts: 4
Joined: Tue Apr 29, 2008 4:10 am

php unsubscribe e-mail

Post by lxm »

Hi all,

I want to create an 'Unsubscribe' link in the e-mails I'm sending out. If the person receiving the e-mail no longer wants to receive e-mails from me, they click the 'Unsubscribe' link in the e-mail which will be something like this:

http://www.mysite.com/unsub.php?email=p ... otmail.com

So upon click this link they will be taken to a page that says, do you wish to stop receiving these e-mails - Yes / No?

When the user clicks 'Yes', I need to save the e-mail address from the link in a text file.

Could anyone tell me how to do this using php?

Thanks,

Laura
mikelbring
Forum Commoner
Posts: 38
Joined: Sat Jan 05, 2008 5:28 pm

Re: php unsubscribe e-mail

Post by mikelbring »

Look into the functions: fopen and fwrite, you will be dealing with flat files.
Post Reply