# PHP Problem

**URL:** <https://forum.kirupa.com/t/php-problem/204111>\
**Category:** flash\
**Created:** [October 17, 2006, 6:48am UTC](https://forum.kirupa.com/t/php-problem/204111 "2006-10-17T06:48:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aynneo](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@aynneo](https://forum.kirupa.com/u/aynneo)\
**Post date:** [October 17, 2006, 6:48am UTC](https://forum.kirupa.com/t/php-problem/204111/1 "2006-10-17T06:48:12Z")

</div>

Hi all got a problem here.

I have a php code written as:

\<?PHP  
$to = “email@.com”;  
$subject = “”;  
$headers = “From: Form Mailer”;  
$forward = 0;  
$location = “”;

$date = date (“l, F jS, Y”);  
$time = date (“h:i A”);

$msg = "Below is the result of your feedback form.  
It was submitted on $date at $time.

";

if ($\_SERVER[‘REQUEST\_METHOD’] == “POST”) {  
foreach ($\_POST as $key =\> $value) {  
$msg .= ucfirst ($key) ." : ". $value . "  
“;  
}  
}  
else {  
foreach ($\_GET as $key =\> $value) {  
$msg .= ucfirst ($key) .” : ". $value . "  
";  
}  
}

mail($to, $subject, $msg, $headers);  
if ($forward == 1) {  
header (“Location:$location”);

}  
else {  
echo “Thank you for submitting our form. We will get back to you as soon as possible.”;  
}

?\>

The problem is I can’t get the $headers = “From: Form Mailer”; when send to the email  
to read as the sender email.

Any Xpert here can help me with these?
