Our registration script works and sends email, but this won't. And it's the same script.
Code: Select all
$result = mysql_query ("SELECT * FROM admin WHERE id='$id'");
while ($row = mysql_fetch_object($result))
{
$to = "$row->email";
$subject = "Account Active";
$headers = "From: info@domain.co.uk";
$body = "Dear $firstname
We are pleased to announce that your account is now active.
Welcome.
To login, simple go to the website, and click the Login link at the top.
Kind regards
";
mail ($to, $subject, $body, $headers);
}