PHP-based Form Mail (Feedback) Script

Please create own domain email id (info@yourdomainname.com)

<?

$mailto=”xyz@yourdomain.com”;
$file=”thanks.htm”;
$pcount=0;
$gcount=0;
$subject = “Mail from Enquiry Form”;

$from=”some-name@yourdomain.com”;
while (list($key,$val)=each($_POST))
{
$pstr = $pstr.”$key : $val \n “;
++$pcount;

}
while (list($key,$val)=each($_GET))
{
$gstr = $gstr.”$key : $val \n “;
++$gcount;

}
if ($pcount > $gcount)
{
$message_body=$pstr;
mail($mailto,$subject,$message_body,”From:”.$from);

include(“$file”);
}
else
{
$message_body=$gstr;

mail($mailto,$subject,$message_body,”From:”.$from);
include(“$file”);
}
?>