php form submit code - (can't get email)
Posted: Wed May 05, 2010 9:52 am
Hi guys,
I was wondering if anyone could help me with this form issue on my site.
On my website I have the following code on a form submit, that should send me an email, but i only get the 'cc' email and not the original email. (the gmail address works the other one doesnt)
I have no knowledge of php, just trying to fix what someone else has done...!
Any advice would be appreciated
many thanks Damian.
The code is below:
if($valid == 1)
{
$to = "info@azofcreatives.com";
$subject = 'Contact Mail';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= "From: ".$email. "\r\n";
$headers .= 'Cc: dayellis@gmail.com' . "\r\n";
$message .= "<strong>Name = </strong>".$fname."<br>";
$message .= "<strong>Tel = </strong>".$tel."<br>";
$message .= "<strong>Email = </strong>".$email."<br>";
$message .= "<strong>Comments = </strong>".$comments."<br>";
@mail($to, $subject, $message,$headers);
header('Location: about_us.php?msg=You message has been received');
I was wondering if anyone could help me with this form issue on my site.
On my website I have the following code on a form submit, that should send me an email, but i only get the 'cc' email and not the original email. (the gmail address works the other one doesnt)
I have no knowledge of php, just trying to fix what someone else has done...!
Any advice would be appreciated
many thanks Damian.
The code is below:
if($valid == 1)
{
$to = "info@azofcreatives.com";
$subject = 'Contact Mail';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= "From: ".$email. "\r\n";
$headers .= 'Cc: dayellis@gmail.com' . "\r\n";
$message .= "<strong>Name = </strong>".$fname."<br>";
$message .= "<strong>Tel = </strong>".$tel."<br>";
$message .= "<strong>Email = </strong>".$email."<br>";
$message .= "<strong>Comments = </strong>".$comments."<br>";
@mail($to, $subject, $message,$headers);
header('Location: about_us.php?msg=You message has been received');