Help with email validation please...

Posted on 16th Feb 2014 by admin

Hi,
Please could you help.
I have a register.php login page where users register, the details are then logged into a temporary database, the user receives an email to verify their email address and then they complete the captha code and their details move to the permanent database. The problem I'm having is the email validation:

//SELECT * FROM $tbl_name WHERE Code = '$passkey'"
$sql="SELECT * FROM $tbl_name WHERE Code = '$passkey'";
$result=mysql_query($sql);


if($result){

$count=mysql_num_rows($result);

if($count==1){

$rows=mysql_fetch_array($result);
$LName=$rows['LName'];
$FName=$rows['FName'];
$UserName=$rows['UserName'];
$Password=$rows['Password'];

The user receives the email and when they try to validate the information the message "wrong confirmation code" appears.

Please help as I've checked this several times and its driving me nuts.

Thanks

Other forums