Re: mail and mysql confirmation of that [double-opt in]

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

 



Grega Leskovsek wrote:
> how is the best way to check if email address is valid: is this preg_match() OK?
> preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/',
> $email);

filter_var($email, FILTER_VALIDATE_EMAIL)

> 
> How can I make double opt-in mail system? My idea:
> 1.) I remember the email entered and user data and the sha1($email);
> in mysql db
> 2.) I send email with activation link of the sha1($email);
> 3.) I am not clear how to proceed when the link is activated. How to
> update the db and submit the necessary form to the marketing.

When the user clicks the activation link, mark the address active in the
subscribers table, or move the entry from a pending table to a
subscribers table.  Then execute the email/whatever to marketing just as
you would without using double opt-in.

> 
> Thanks in advance,
> 
> 

-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
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