I'm trying to debug a contact form that was built in Flash, but I'm not sure how I can go about debugging this. From the ActionScript, I can tell that it's supposed to POST the results to /assets/files/functions.php. The problem is that when I fill out the fields and click onto 'Send' (which is supposed to trigger this), nothing happens and I can't tell if it's a PHP issue or a flash issue.
Is there any ideas as to how to debug this?
The website can be found here and the form can be seen by clicking onto 'Connect' and then click onto 'Send Inquiry'.
The code may be seen below:
lvOut = new LoadVars(); //create lv object
lvIn = new LoadVars(); //create lv object
lvIn.onLoad = function (success) {
if(success){
gotoAndPlay("success");
}else{
gotoAndPlay("failure");
}
}
function submit() {
if ( (inputName.text != "") && (inputAddress.text != "") && (inputCity.text != "") && (inputState.text != "")
&& (inputCountry.text != "") && (inputTelephone.text != "") && (inputEmail.text != "") ) {
lvOut.input_name = inputName.text;
lvOut.input_address = inputAddress.text;
lvOut.input_city = inputCity.text;
lvOut.input_state = inputState.text;
lvOut.input_zip = inputZip.text;
lvOut.input_country = inputCountry.text;
lvOut.input_telephone = inputTelephone.text;
lvOut.input_email = inputEmail.text;
lvOut.input_bedrooms = inputBedrooms.text;
lvOut.input_realtor = inputRealtor.text;
lvOut.input_comments = inputComments.text;
if (realtorYes) {
lvOut.input_hasRealtor = "yes";
} else if (realtorNo) {
lvOut.input_hasRealtor = "no";
} else {
lvOut.input_hasRealtor = "no answer";
}
//send vars to functions page and load in result
lvOut.sendAndLoad("assets/files/functions.php", lvIn, "POST");
}
}
btnSend.addEventListener("click", submit);
Please help me out as much as possible! :-)