Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Posts
    217
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question script for confirmation via email ( for registration)??

    i had planned to use the popular concept for membership ie verification by email..
    I am trying to make the registration form which has email(username),password,re-password fields.....Once the form is submitted then the confirmation link should be emailed to the user with some unique 32 bit numbers.....Once clicked on the link then his membership should be active.......
    Can anybody help me with the neccesary code or examples about how this email verification can be carried out for membership..................???
    I would be very greatful if this problem is solved........
    Again thanks in advance.....

  • #2
    Senior Coder
    Join Date
    Apr 2005
    Location
    Colorado, United States
    Posts
    1,208
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What I do is when they register, I insert two rows. One row into the users table, and another into an activation table. The id of the activation row is randomly generated (sha1(mt_rand()) for me), and then the id is emailed to the user. They click the link and it goes to a script which queries the activation table. In mine it clears any activation older than 48 hours out first though. If it exists, then it update's the users row and deletes the activation row.
    "$question = ( to() ) ? be() : ~be();"

  • #3
    Regular Coder
    Join Date
    Sep 2005
    Location
    Liverpool
    Posts
    226
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I use a similar system but only use one row
    email address, active(yes/no), date, random string

    when they first apply the email address gets added along with the default of no followed by the date and a random string. They are then sent an email requesting that they fill in a further form to confirm (obviously this could be done dynamically using $_GET.

    To unsubscribe they have enter the same random string (or reuqest a reminder of it).

    Plus and unactivated email addresses can get removed on whatever basis.
    my mind is on a permanent tangent

  • #4
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Have a read through this tutorial
    http://www.phpfreaks.com/tutorials/40/3.php


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •