Form validation script problem

I recently had a client ask me to fix a previously designed Contact form on their Flash site. The form works perfectly, except for the fact that the missing fields test does not seem to work. (In other words, it doesn’t recognize when required fields are left blank.) Below is the script that is called when the Submit button is clicked…it should jump to a frame that contains this:

Logo.gotoAndStop(“YELLOW”);
lbl_fm_name.gotoAndStop(“BLACK”);
lbl_fm_title_dept.gotoAndStop(“BLACK”);
lbl_fm_comp.gotoAndStop(“BLACK”);
lbl_fm_biz_type.gotoAndStop(“BLACK”);
lbl_fm_addr.gotoAndStop(“BLACK”);
lbl_fm_city.gotoAndStop(“BLACK”);
lbl_fm_state.gotoAndStop(“BLACK”);
lbl_fm_zip.gotoAndStop(“BLACK”);
lbl_fm_phone.gotoAndStop(“BLACK”);
lbl_fm_email.gotoAndStop(“BLACK”);

Then, 5 frames later, it should procedd to a frame containing this script:

function MarkFields(state) {
ar_error_fields = new Array();
ar_error_fields = FormData.php_result.split(":");
for (x=0; x<ar_error_fields.length; x++) {
eval(“lbl_”+ar_error_fields[x]).gotoAndStop(state);
}
}
if (FormData.php_check eq “1”) {
if (FormData.php_status eq “ef”) {
MarkFields(“RED”);
gotoAndStop(“FORM-MISSING”);
} else if (FormData.php_status eq “pm”) {
MarkFields(“RED”);
gotoAndPlay(“FORM-MISMATCH”);
} else if (FormData.php_status eq “1”) {
gotoAndPlay(“FORM-END”);
} else if (FormData.php_status eq “X”) {
gotoAndPlay(“FORM-PERROR”);
} else {
gotoAndPlay(“FORM-TEST”);
}
}

Any help would be appreciated!

Thanks
Rockinwebguy

This doesn’t appear to have anything to do with validating any forms. It just checks to see if they are valid. To me, it looks like a PHP script actually does the validating. Do you have that?

GL,

Thanks for your help. I found the PHP file, but it won’t let me post the code here as it has too many characters. Any ides?

Rockin

attach it.

Warning:
I’m not that good with PHP, fortunatly there are many here who are.