how to create a autogenerated link using php ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rahul8590
    New Member
    • May 2010
    • 1

    how to create a autogenerated link using php ?

    For example , as I registered in bytes.com, a mail was sent to my email id and after clicking on that link, I could complete my registration .

    I want to develop a similar module in PHP, where the users after signing in, I sent this patticular autogenerated link to their email id and confirm their registrations.
  • Niheel
    Recognized Expert Moderator Top Contributor
    • Jul 2005
    • 2433

    #2
    You would generate a random key. Save that key into the database in a column inside the user table.

    Then append the random key to your script that will do the validation.

    For example: http://website.com/validation.php?ra...32089&userid=4

    Then email it to the user using the mail function.

    When the user clicks on it, you test the key and user id to make sure that they both exist in the database and that the random key is in the same row as the userid.

    And that will let you have a user with a validated email.
    niheel @ bytes

    Comment

    Working...