runnerjp Posted November 20, 2007 Share Posted November 20, 2007 hey guys... i have followed http://www.evolt.org/PHP-Login-System-with-Admin-Features and created it successfully.... i would now like to add to the script by making it so that for a user to register they must activate it through a link sent in a email... 2 questions 1. what information from this will i need to set it up 2. and how Quote Link to comment https://forums.phpfreaks.com/topic/78155-adding-mail-activation-link/ Share on other sites More sharing options...
trq Posted November 21, 2007 Share Posted November 21, 2007 Um, you answered almost the same question asked earlier by someone else. Here is what you had to say. Quote Link to comment https://forums.phpfreaks.com/topic/78155-adding-mail-activation-link/#findComment-395580 Share on other sites More sharing options...
runnerjp Posted November 21, 2007 Author Share Posted November 21, 2007 lol this is because i thought it was streight forward untill i attempted it myself... i was hopein to d it and also pass on info Quote Link to comment https://forums.phpfreaks.com/topic/78155-adding-mail-activation-link/#findComment-395824 Share on other sites More sharing options...
unidox Posted November 21, 2007 Share Posted November 21, 2007 Here, just generate an activation code, how ever long you want it. Then store it in a db, and have another row in the db for activation = 0. So then make an activation page, so when the username and code match, it changes the 0 to a 1. Then the user will be activated. Quote Link to comment https://forums.phpfreaks.com/topic/78155-adding-mail-activation-link/#findComment-395922 Share on other sites More sharing options...
runnerjp Posted November 21, 2007 Author Share Posted November 21, 2007 yes the only problem i have is what code would i use to chnage 0 - 1 Quote Link to comment https://forums.phpfreaks.com/topic/78155-adding-mail-activation-link/#findComment-396334 Share on other sites More sharing options...
Cagecrawler Posted November 21, 2007 Share Posted November 21, 2007 UPDATE users SET activated = 1 WHERE activation_code=... Quote Link to comment https://forums.phpfreaks.com/topic/78155-adding-mail-activation-link/#findComment-396336 Share on other sites More sharing options...
premiso Posted November 21, 2007 Share Posted November 21, 2007 Given that you have a login page with code make them link to the login page: login.php?action=validate&code=234dsf342rt345twf&[email protected] Give that you check the code you pull out the user information for the email and check the code against the DB one. If it is good then update the column activated to be one... Quote Link to comment https://forums.phpfreaks.com/topic/78155-adding-mail-activation-link/#findComment-396337 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.