You are here: Re: Building a php optin mailing list « PHP Language « IT news, forums, messages
Re: Building a php optin mailing list

Posted by Stefan Rybacki on 07/21/05 23:05

Johan wrote:
> I am using a mysql db
>

>

So what about this:

emails are stored in a database.
say the table holding the emails contains the following columns:

id, email, activationkey, sent, activated, senttime

in your php script that sends activation emails (e.g. sendactivationmails) you just get
all emails that are not already sent and those that are sent but not activated after a while.
Now you send your activation emails to each retrieved email with an activation key (you
create before sending e.g. by calling $key=md5(time().$email.random data); and the id
attached to a link like this:

http://www.foobar.com/activateemail.php?id=$id&key=$key

after successfully sending the email you update the activationkey and the senttime in your
database.


the second script e.g. activateemail.php retrieves an id and a key, which you check in
your database and if they match you set the activated attribute.

Any questions?

Regards
Stefan

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация