You are here: Re: [PHP] best flow for this project « PHP « IT news, forums, messages
Re: [PHP] best flow for this project

Posted by Richard Lynch on 02/01/05 20:23

Dustin Krysak wrote:
> -a user adds their email address, name, etc to a database.
> -a responder sends an email to them to confirm their email address
> (within 72 hrs).
> -upon confirmation of their email address, a script will generate a
> store coupon with a random coupon id # in the browser (which they can
> print at that time).
>
> Now I guess my question relates more to the email confirmation. How
> would you go about this? Store it in a database? Every-time the script
> is run it also checks to see which requests are more than 72 hrs old
> and removes their request from the database? And those that are
> confirmed, a flag is added to the database so they are not removed?
>
> Just looking more for ideas on the script flow to accomplish this.

If you WANT them to get the coupon and carry out the transaction to make
the sale, I'd have the response email just go out as part of the
registration process using: http://php.net/mail (unless you need *TONS* of
email to go out, and should upgrade to SMTP using a class from
http://phpclasses.org)

If you HOPE they don't turn in the coupon (rebate) you'd want to send it
out as late as possible while not violating your 72 hour promise, so you'd
use a cron job to do it.

To delete records older than 72 hours with no confirmation, I'd just run a
cron job.

Google for "man 5 crontab" and "cron PHP" to learn more about how to work
cron and PHP together. If you're on Windows, just substitute "scheduled
task" for cron. Same thing, but MS can't use industry-standard
terminology.

--
Like Music?
http://l-i-e.com/artists.htm

 

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

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