Easiest way for PHP email verification link

ultimate system

New Member
I already have an advanced user login/register system on my website (colemansystems.psm2.co.uk). However, I would like to have a email sent to new users for verification of their email address. If they have not clicked the link they will not be able to access their account. I am semi-experienced with PHP and MySQL, so please explain in depth.Edit: The code I'm using for the \[code\]verify.php\[/code\] file (the link the user click on with a GET (for example, \[code\]verify.php?d=51773199320\[/code\]))\[code\]$secret = $_GET['d'];$result = mysql_query("SELECT valid FROM users WHERE secret=$secret");while ($row = mysql_fetch_array($result)){ $valid = $row['valid'];}if ($valid == "") { echo"There seems to be a problem with the verification code.<br><br><br><br><br>";}elseif ($valid == "1"){ echo"Your account is already verified.<br><br><br><br><br>";}else{ mysql_query("UPDATE users SET valid = '1' WHERE secret=$secret"); echo "Thank you, your account is now verified and you are free to use the exclusive features!<br><br><br><br><br><br>";}\[/code\]Is this secure?
 
Back
Top