Can you please tell me what's wrong with this piece of code? It gives me error.
<?php
// send e-mail
$headers = "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\nFrom: \"SoccerBoards Admin\" <webmaster@soccerboards.com>\r\n";
$mail_message =
"<TABLE border=0 cellspacing=0 cellpadding=10 bgcolor=$bg_color width=500><TR><TD>" .
"<B>$P_fname $P_lname,</B><BR><BR>" .
"Thank you for registering at SoccerBoards.com. To activate your account" .
"please follow the below link, or copy/paste it into your browser. You will then" .
"be able to sign in with your username ($P_uname), and password.<BR><BR>" .
"<A href=\"http://www.soccerboards.com/activate.php?u=$P_uname&a=$code\">" .
"http://www.soccerboards.com/activate.php?u=$P_uname&a=$code</A></TD></TR></TABLE>";
if (!mail($P_email, "Welcome to SoccerBoards.com", $mail_message, $headers)) die("Error sending e-mail message");
?>
It's driving me nuts. It's not sending the email and i don't know why. All the parameters are entered ok in the database, but on this part it's not sending the email. I would appreciate any help.
I will also attach the 2 pages involved