runnerjp Posted March 14, 2007 Share Posted March 14, 2007 hey guys i have a registration page and what whant to do is make it so users have to validate an account by clicking on a link in the email like you see on most sites. how would i do this?? Link to comment https://forums.phpfreaks.com/topic/42653-validate-your-account-by-clicking-on-a-link-in-the-email/ Share on other sites More sharing options...
flappy_warbucks Posted March 14, 2007 Share Posted March 14, 2007 what i would do is give the user a unique reference number and save that into a SQL database. then i would make a page called validate.php and have a link in the email pointing to that page, for example: www.mysite.com/validate.php?v=unique_ref_num that way u can lift the code from the address mar, and compare that to the SQL, if they have clicked the link and the two match up (i.e. the link address and the SQL) then you know the email address is valid. Link to comment https://forums.phpfreaks.com/topic/42653-validate-your-account-by-clicking-on-a-link-in-the-email/#findComment-206933 Share on other sites More sharing options...
runnerjp Posted March 14, 2007 Author Share Posted March 14, 2007 that a good idea...BUT... sounds complex lol gotta figure out how to do all that :| Link to comment https://forums.phpfreaks.com/topic/42653-validate-your-account-by-clicking-on-a-link-in-the-email/#findComment-206936 Share on other sites More sharing options...
flappy_warbucks Posted March 14, 2007 Share Posted March 14, 2007 You could include a valid column in your database, and just set that to 1 (or true) where the UIN is. $UIN = $_REQUEST['V']; include "database.php"; $QUERY = "UPDATE USER_ACCOUNTS SET VALID=1 WHERE $UIN='V'"; $MYSQL_QUERY($QUERY); Link to comment https://forums.phpfreaks.com/topic/42653-validate-your-account-by-clicking-on-a-link-in-the-email/#findComment-206937 Share on other sites More sharing options...
flappy_warbucks Posted March 14, 2007 Share Posted March 14, 2007 You could include a valid column in your database, and just set that to 1 (or true) where the UIN is. $UIN = $_REQUEST['V']; include "database.php"; $QUERY = "UPDATE USER_ACCOUNTS SET VALID=1 WHERE $UIN='$UIN'"; $MYSQL_QUERY($QUERY); sorry my muistake V should be $UIN in the query my bad Link to comment https://forums.phpfreaks.com/topic/42653-validate-your-account-by-clicking-on-a-link-in-the-email/#findComment-206939 Share on other sites More sharing options...
runnerjp Posted March 14, 2007 Author Share Posted March 14, 2007 iu will have a go at it ty Link to comment https://forums.phpfreaks.com/topic/42653-validate-your-account-by-clicking-on-a-link-in-the-email/#findComment-206943 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.