I want to create a newsletter script that asks for the users email, they they receive an email with a link to click to confirm that they really want the newsletter.
How is the best way to go about this. I was thinking of
user completes form
script to add email, name, ID (unique as it goes into DB) etc to DB
look for last DB entry (should be the one above) and grab ID key
send user email with link containing id key
user clicks link and it updates a flag in DB to confirm double opt in
Is that the best way to do it or is there a better way? If that`s the one I should go for, is it easy to grab the last entry from a SQL server db?
Thanks
How is the best way to go about this. I was thinking of
user completes form
script to add email, name, ID (unique as it goes into DB) etc to DB
look for last DB entry (should be the one above) and grab ID key
send user email with link containing id key
user clicks link and it updates a flag in DB to confirm double opt in
Is that the best way to do it or is there a better way? If that`s the one I should go for, is it easy to grab the last entry from a SQL server db?
Thanks