E-Mail Varification
Moderator: General Moderators
E-Mail Varification
Hi i have my login / register script done, but i would like a email varification on it, i would have a clue how to do this and cant seem to find help else where.
anyone have any ideas?
anyone have any ideas?
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
uhh... you would put that in your email and then they clickt he link and it goes to a page you have setup and in the database whent hey first register have field like registration and have like pending or something and tehn when they visit the click it verifies their email and password and then changes the pending to registered!
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
generate a random number thats stored with their username, then the URL in the body of the email would be
yoursite.com/verify.php?userid=84&code=489434
(ie. yoursite.com/verify.php?userid=$id&code=$randcode)
then on verify.php check the dbvalue for the random code (saved when the email was sent), versus the one in the URL (ie. SELECT vercode FROM table WHERE userid = $id) and if its the same, then change the account to active (say db var "active" from 0 to 1 or w/e)
yoursite.com/verify.php?userid=84&code=489434
(ie. yoursite.com/verify.php?userid=$id&code=$randcode)
then on verify.php check the dbvalue for the random code (saved when the email was sent), versus the one in the URL (ie. SELECT vercode FROM table WHERE userid = $id) and if its the same, then change the account to active (say db var "active" from 0 to 1 or w/e)
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
ok i have another aproach, an email is sent to the user telling them to go to a page,
on the page are 2 boxes,
one is their email wich tehy have to enter then their password,
if both match and reg=1 it goes to 0 and they are varified.
if it is 0 it tels them they are already varified, will that work?
on the page are 2 boxes,
one is their email wich tehy have to enter then their password,
if both match and reg=1 it goes to 0 and they are varified.
if it is 0 it tels them they are already varified, will that work?