Folks,
Do you spot any logical errors in my script ?
I have not given the full script but the SendMail part where I am encountering problem.
I get error:
Parse error: syntax error, unexpected ‘”‘ in /home/…… on line 155.
Line 155 is the line before the <html> tag. That line shows this:
$body = “$first_name.” “.$surname ?>,
Look at the 5th line from the following code. That is where the error occurs:
[code=php]
$account_name = “$username”;
//Step 3C. Email user their account activation link for them to click to confirm their Email Address and activate their new Account.
$to = “$primary_website_email”;
$subject = “Your Following Browser account activation details!”;
$body = “$first_name.” “.$surname ?>,
<html>
<head>
<title>Activation Link</title>
</head>
<body>
Thank you for joining us!<br>
You need to click on the following link <a href=”<?php .$account_activation_link.”>$account_activation_link?></a> to activate your account.
</body>
</html>”;
<?php $headers = “From: $site_admin_email”;
//More headers
//Always set content-type when sending HTML email
$headers = “MIME-Version: 1.0” . “rn”;
$headers .= “Content-type:text/html;charset=UTF-9” . “rn”;
if (!mail($to,$subject,$body,$headers))
{
//Alert user System Error. System unable to email the Account Activation Link.
echo “Sorry! We have failed to email you your account activation details. Please contact the website administrator!”;
exit();
}
else
{
//Alert user System Success. System was able to email the Account Activation Link.
echo “<h3 style=’text-align:center’>Thank you for your registration!</h3><br>”;
echo “Now, check your email “$primary_website_email” for details on how to activate your new account “$account_name” which you just registered.”;
exit();
}