Record is inserting but email is not going..
if($_POST['registersubmit'])
{
$to="'".$_POST['email']."'";
include('db.php');
$checkemail=mysql_num_rows(mysql_query("select * from authentications where email='".$_POST['email']."'"));
if($checkemail)
header("Location:".$_SERVER['PHP_SELF']."?msg=E-Mail Already Exists ");
else
{
$query="insert into authentications (password, authcode, email, status, created_at)
values ('".$_POST['password']."', '".md5($_POST['email'])."', '".$_POST['email']."', 0, '".date('Y-m-d h:i:s')."')";
if(mysql_query($query))
{
$headers1 = 'MIME-Version: 1.0' . "\r\n";
$headers1 .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers1 .= "From: Delhi Certificates \r\n";
$headers1 .= "Organization: Delhi Certificates\r\n";
$Subject1 = "Your account has been registered. Thank you!";
$msg="
You recently registered for Delhi Certificates using this email address. To complete your registration, follow the link below:
http://www.mobile9.com/register.php?authcode=e3dd578882c18b1dcf9f741fc20fc195&email=".$_POST['email']."
(If clicking on the link doesn't work, try copy and paste it into your browser.)
If you did not register for mobile9.com, please disregard this message.
Thanks,
Delhi Certificates
";
// echo $msg;
// echo $to, $Subject1, $msg, $headers1;
$success = mail($to, $Subject1, $msg, $headers1);
// header("Location:".$_SERVER['PHP_SELF']."?msg=Email hass been sent ");
}
}
}