docock
12-08-2010, 01:11 PM
I'm using the coding below to send an activation email whenever someone signs up at my page.
However I'm getting this error: Parse error: syntax error, unexpected T_VARIABLE in /home/a1332560/public_html/index.php on line 16
which refers to the line with the url in it.
What's wrong with that line? And how can I add some html coding with pictures to this email?
echo "Your activation mail has been sent!";
$to = $_POST[email];
$subject = "mysite.com activation mail";
$from = "From: sender@example.com\r\n"
$body = "Thanks for registering at mysite.com.\n <br>Click <a href='http://mysite.com/activate.php'> here </a> to complete the registration.";
if (mail($to, $subject, $body, $from)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
However I'm getting this error: Parse error: syntax error, unexpected T_VARIABLE in /home/a1332560/public_html/index.php on line 16
which refers to the line with the url in it.
What's wrong with that line? And how can I add some html coding with pictures to this email?
echo "Your activation mail has been sent!";
$to = $_POST[email];
$subject = "mysite.com activation mail";
$from = "From: sender@example.com\r\n"
$body = "Thanks for registering at mysite.com.\n <br>Click <a href='http://mysite.com/activate.php'> here </a> to complete the registration.";
if (mail($to, $subject, $body, $from)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}