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
    New Coder
    Join Date
    Mar 2010
    Location
    Australia
    Posts
    93
    Thanks
    38
    Thanked 0 Times in 0 Posts

    user registration using email verification

    i have done a user registration form and when users click submit, it updates the user database and flags a value 0 in an active field in users table. Now i want to send users an url and when they click on the url the active flag in my users table should change.
    Can anyone please help me on this?
    Thanks

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    I'm not really clear what part you need help with... the update query? Or what specifically has you tripped up?

  • #3
    New Coder
    Join Date
    Mar 2010
    Location
    Australia
    Posts
    93
    Thanks
    38
    Thanked 0 Times in 0 Posts
    actually i have a user table with the following field:
    ID NAME PASS EMAIL ACTIVE
    and i have user registration form which ask users for the above details, excluding the "active" part, which by default is false. I want to send a URL to the user in their given email and when they click on that URL then the "active" field should change to True.

    Thanks

  • #4
    Regular Coder
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    254
    Thanks
    1
    Thanked 63 Times in 63 Posts
    I'd suggest adding another field to that table.
    Then whenever you create an account, generate a random string of alphanumeric characters and store it in that field.
    Afterwards, send an email to the user with a specific link such as "http://www.mysite.com/activate_user.php?email=johndoe@email.com&key=sadaqwe348194085ry324" where key is the generated random string

    Before activating, check the email address and verify the "key" associated to it and also make sure "active" is still set to FALSE. If those conditions are met, update "active" to TRUE.

  • Users who have thanked shadowmaniac for this post:

    avizhome (04-02-2010)


  •  

    Posting Permissions

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