i created this contact form in flash 8 and i get the email but an UNDEFINED message pops up on my status
i cant get rid of it please help me out
here is my action script for the submit button
on (release) {
status.text = "";
if(formValidationChecks()){
//filling LoadVars object with variable values
my_lv = new LoadVars();
result_lv = new LoadVars();
my_lv.firstname = firstname.text;
my_lv.lastname = lastname.text;
my_lv.email = email.text;
my_lv.phone1 = phone1.text;
my_lv.phone2 = phone2.text;
my_lv.address = address.text;
my_lv.city = city.text;
my_lv.zip = zip.text;
my_lv.brand = brand.text;
my_lv.model = model.text;
my_lv.serial = serial.text;
my_lv.age = age.text;
my_lv.message = message.text;
trace( my_lv.firstname + " " + my_lv.lastname + " " + my_lv.email + " " + my_lv.message + " " + my_lv.phone1 + " " + my_lv.phone2 + " " + my_lv.address + " " + my_lv.city + " " + my_lv.zip + " " + my_lv.brand + " " + my_lv.model + " " + my_lv.serial + " " + my_lv.age + " ");
my_lv.sendAndLoad(serverFile, result_lv, "POST");
// When the results are received from the server...
result_lv.onLoad = function(success:Boolean) {
if (success) {
firstname.text = lastname.text = email.text = message.text = phone1.text = phone2.text = address.text = city.text = zip.text = brand.text = model.text = serial.text = age.text = "";
}
status.text = result_lv ["serverResponse"];
};
}
}
and this is the forms action script
serverFile = "http://www.mywebsite.com/mail.php";
//function to seperate form validation checks from email sending logic
function formValidationChecks(){
//checking if email format is valid
if ((!firstname.text.length) || (firstname.text.indexOf("") == -1) || (firstname.text.indexOf("") == -1)) {
status.text = "Please Enter Your First and Last Name";
return false;
//checking if from field is not blank
} else if (!lastname.text.length) {
status.text = "Please Enter Your Last Name";
return false;
} else if (!phone1.text.length) {
status.text = "Please Enter A Contact Number";
return false;
//checking if message is not blank
} else if (!message.text.length) {
status.text = "Please enter a description to your problem";
return false;
} else if (!address.text.length) {
status.text = "Please Enter Physical Address Where You Would Like Service";
return false;
} else if (!city.text.length) {
status.text = "Please Enter City and State";
return false;
} else if (!brand.text.length) {
status.text = "Please Enter Brand Of Unit";
return false;
} else if (!model.text.length) {
status.text = "Please Enter Model Number";
return false;
} else if (!serial.text.length) {
status.text = "Please Enter Serial Number";
return false;
}
return true; //returning success if everything is fine
}
and this is my php
<?php
$fistname = $_REQUEST["firstname"];
$email = $_REQUEST["email"];
$message = $_REQUEST["message"];
$to = "myemail@lalaland.com";
$subject = "Web Service Request Factory Appliance Service";
$Body = "";
$Body .= "First Name: ";
$Body .= $firstname;
$Body .= "
";
$Body .= "Last Name: ";
$Body .= $lastname;
$Body .= "
";
$Body .= "Email: ";
$Body .= $email;
$Body .= "
";
$Body .= "phone: ";
$Body .= $phone1;
$Body .= "
";
$Body .= "phone2: ";
$Body .= $phone2;
$Body .= "
";
$Body .= "firstname: ";
$Body .= $firstname;
$Body .= "
";
$Body .= "message: ";
$Body .= $message;
$Body .= "
";
$Body .= "Address: ";
$Body .= $address;
$Body .= "
";
$Body .= "City: ";
$Body .= $city;
$Body .= "
";
$Body .= "phone: ";
$Body .= $phone;
$Body .= "
";
$Body .= "phone2: ";
$Body .= $phone2;
$Body .= "
";
$Body .= "firstname: ";
$Body .= $firstname;
$Body .= "
";
$Body .= "message: ";
$Body .= $message;
$Body .= "
";
$ok= mail($to, $subject, $Body);
if($ok) {
echo( "&serverResponse = Request has been sent. Thanks!");
} else {
echo("&serverResponse = Sorry the email could not be sent. Please try again.");
}
?>
THANKS IN ADVANCE FOR YOUR HELP!