shamsuljewel Posted August 9, 2007 Share Posted August 9, 2007 I am creating a registration form. There have a email field. After successfully complete a mail with activation link will send to the email. After clicking the activation link then he can login. So how can I do this? Can anyone help me? Pls help me........ Quote Link to comment https://forums.phpfreaks.com/topic/64064-verify-email-address/ Share on other sites More sharing options...
chocopi Posted August 9, 2007 Share Posted August 9, 2007 well assuming you already have the form and email setup all you need is the link. What I would do: 1. In your database store a unique string for the user (I usually md5 their username) at the registration and have a field called active which is set to 0 as default. 2. In your email have the message and on the link have http://www.yourpage.com/activation.php?id={$unique_string} 3. Then on activation.php all you need is to use GET to get the unique string where you look it up in the database for the user. 4. If found set active to 1. 5. For your login when checking if username and password match check they are active = 1. Well thats the basic idea. Hope it helps ~ Chocopi Quote Link to comment https://forums.phpfreaks.com/topic/64064-verify-email-address/#findComment-319293 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.