Re: best flow for this project

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux