PDA

View Full Version : authentication system with activating link by email


bluechip
05-23-2003, 11:58 AM
authentication system with activating link by email

hi boardies

i would like to have a member sektion on my website. the visitors should be able to register for an account. but, i would like to have an email sent to them after they registered for the account. the email should contain a link on wich they first have to klick to activate the account.

does anyone know a tutorial on how to build such an activating system via email

thx and have a lot of fun:thumbsup:

bluechip

Nightfire
05-23-2003, 06:05 PM
You'd have a random id created for the user in the database, then use a link like http://yourdomain.com/confirm.php?userid=uniquieidhere&conf=randomnumberhere

then on confirm.php you'd get the values of $_GET['userid'] and $_GET['conf'] and query them against eachother.


@mysql_query("SELECT `randomnumber` FROM users WHERE userid='$_GET[userid]'") or die("No member found with this userid or confirmation number");

Fatman
05-24-2003, 12:02 PM
or just have a filed in a database table called authorised

Then if you went to www.domain.com/auth.php?email=me@home.com

(thats the link you woul dmeail them with)

then oon auth.php read in the $email var and set authorize to 1

could could swap email out with the Userid etc etc

fatman