im a newbie php developer...
i've tried sending an email n receiving the confirmation back for activating the users...
here is the email sending code :
if($res)
{
echo "record added";
$to = $mail;
$sub = "Confirm Mail From LeLys";
$header = "from: admin<support@domain.org>";
$message = "confirm link \r\n";
$message.= "click to activete your account";
$message.= "http://www.domain.org/confirmation.php?key=$ccode";
$sending = mail($to,$sub,$message,$header);
if($sending)
echo ("email comfirm");
else
echo("email not sent");
}
here is the Confirmation Page :
$passkey = $_GET['key'];
$sql1 = "SELECT * FROM temp_db WHERE code='$passkey'";
$result1 = mysql_query($sql1);
if($result1)
{
// Count how many row has this passkey
$count = mysql_num_rows($result1);
// if found this passkey in our database, retrieve data from table "temp_members_db"
if($count == 1)
{
$rows = mysql_fetch_array($result1);
$a = $rows['fname'];
$b = $rows['mname'];
$c = $rows['lname'];
$d = $rows['dob'];
$e = $rows['gender'];
$f = $rows['email'];
$g = $rows['country'];
$h = $rows['phno'];
$i = $rows['mobile'];
$j = $rows['userid'];
$k = $rows['password'];
$l = $rows['mti'];
$m = = $rows['rtime'];
$sql2 = "INSERT INTO regd_db(fname,mname,lname,dob,gender,email,country,phno,mobile,userid,password,mti,rtime)
VALUES('$a','$b','$c','$d','$e','$f','$g','$h','$i','$j','$k','$l','$m')";
$result2 = mysql_query($sql2);
}
// if not found passkey, display message "Wrong Confirmation code"
else
echo "Wrong confirmation code";
// if successfully moved data from table"temp" to table "registered" display"Your account has been activated"
if($result2)
{
echo "You hav Been Activated.. please log in";
$sql3 = "DELETE FROM temp_db WHERE code='$passkey'";
$result3 = mysql_query($sql3) or die("Cud not delete temp files");
}
}
On clicking the link in my email, i get a BLANK confirmation page...
wat is the prob.. ?
need help