email validation url problem.
Posted: Fri Dec 17, 2004 4:57 am
Hey guys i've created a register form which sends a validation email to the user. Everything works fine except the url link which it gives to click doesn't allow the user to click it. it appears but not as a url just blue static text as part of the message. However i have given it the <a href> to make it a url. code below any ideas?
message body of email is as followed:
Code: Select all
<? function send_validation_email()
{
$firstname = $_POST['firstName'];
$surname = $_POST['lastName'];
$username = $_POST['username'];
echo $firstname
." "
. $surname
. ", You have succesfully become a customer of Funky Monkey Records. You will recieve a validation e-mail so you can activiate your account.<br><br>
";
$link_id = db_connect();
$query= mysql_query("Select customer_id from customers where username = '$username'");
$row = mysql_fetch_array($query);
$customer_id = $row['customer_id'];
$emailMessage = "<html><body>Dear ". $firstname . " " . $surname. "<br><br>
You have registred an account at Funky Monkey Records. In order to complete registration you have to click this activation
link:<br><a href="validate.php?page=validate&customer_id=" . $customer_id . "">validate.php?page=validation&customer_id=" . $customer_id . "</a></body></html>";
$to = $_POST['email'];
$from = "mmc01ms@hotmail.com";
$message= $emailMessage;
$subject = "Succesfully registred as ". $username;
$headers = "From: $from";
if(mail($to,$subject,$message,$headers)){
} else{
echo"<br><br>Failed sending an email";
}
}
?>message body of email is as followed:
Code: Select all
Dear manpreet Smith
You have registred an account at Funky Monkey Records. In order to complete registration you have to click this activation link:
validate.php?page=validation&customer_id=123577