I haven't been able to figure this out. I think it must have something to do with how the script is called, but I don't know.... I have looked over every line and it still baffles me.

This script sends the form data submitted just fine, but it also sends a blank empty form as well, from unknown sender.

I have abbreviated some of it here, just to see how it is set up.

form is submitted to a php page with the following:

at the top is an include file containing the function..
PHP Code:
<?php
include("scripts/send_app.php");
send_lawapp($_POST);
?>
the include file is a pretty basic function...
PHP Code:
function send_lawapp($appData){

// collect application into vars
$fullname $appData["FullName"];
$address1 $appData["Address1"];
$address2 $appData["Address2"];
$city $appData["City"];
$state $appData["State"];
$zip $appData["ZipCode"];
$email $appData["email"];
$dob $appData ["DateofBirth"];
$hphone $appData["HomePhone"];
$wphone $appData["WorkPhone"];
$cphone $appData["MobilePhone"];

// Just formats all of the $appData here....
// I don't think the problem is here,
// because I have tried simply $app = "test"
// and it still sends duplicate messages...

$app1 "test";
$subject "mywebsite.com - Online Application";

$headers 'MIME-Version: 1.0' "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' "\n";
$headers .= 'From: ' $fullname '<' $email '>' "\n";


mail("[email protected]"$subject$app1$headers);

so it sends 2 emails always! 1 is blank (contains no submitted data) from unknown the other is fine.

anyone have any idea where my problem might be?

Thanks.