Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Confirmation Emails

Status
Not open for further replies.

OldSmelly

Programmer
Nov 22, 2001
70
NL
Hello,

As with so many websites I want to send the user a confirmation email with a link to a activation page as the user changes his login credentials.

Does anyone know how do to create these links ?

I have a fare idea but just can't put my finger on it.

Thanks in advance

Hans
 
You'll need two scripts.

The first script takes an email address, generates some kind of hash, stores both in a database, then sends a message with a verification URL to the email address. The URL will be of the form: [ignore] hash>[/ignore]

Somescript.php will then take that email and hash and see if a record with matching values exists. If it does, the address is considered validated.

I recommed that all records created by the first script have a timestamp on them. The user must validate the address before <timestamp> + <some number of hours>. The timestamp also allows you to write a housekeeping script that runs perodically (or which could be part of the validating second script) and removes entries that have been in the table too long.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top