# Php Mailer Form Help!

**URL:** https://forum.kirupa.com/t/php-mailer-form-help/227537
**Category:** web dev
**Created:** [May 31, 2007, 2:33am UTC](https://forum.kirupa.com/t/php-mailer-form-help/227537 "2007-05-31T02:33:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![thewishmaster](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@thewishmaster](https://forum.kirupa.com/u/thewishmaster)
#### Post date: [May 31, 2007, 2:33am UTC](https://forum.kirupa.com/t/php-mailer-form-help/227537/1 "2007-05-31T02:33:48Z")

</div>

helo everyone, just got a problem with my code. actually i got it here kirupa tutorial about PHP mailer form. it doest work on me. i dont know what the errors are. kindly pls check?

MY CODE:  
\<?PHP  
$to = “[webmaster@site.com](mailto:webmaster@site.com)”;  
$subject = “Results from your Request Info form”;  
$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.”;  
}  
?\>

THIS IS THE ERROR:

it opens a pop up windows saying: do you want to download the file? the option buttons are: OPEN, SAVE, CANCEL.

its like downloading a file on the internet.

help please. thanks

thewishmaster.
