IF, Else if registraition form

I’m trying to make a registraition form, but to have it I must be sure that all of the fields are field correctly , for example I want to check that pass 1 the same with the confirmation that is pass2, or e-mail it is e-mai address and nothing else. But this code below doesn’t do anything like this. please help.

on (release, keyPress “<Enter>”) {
if (txt_FirstName.text != “”) {
trace(“First Name was accepted”);
} else {
trace(“Please Reenter your Firs Name”);
txt_FirstName.text = “Please enter your Firs Name”;
}
if (txt_LastName.text != “”) {
trace(“Last Name was accepted”);
} else {
trace(“Please enter your Last Name”);
txt_LastName.text = “Please enter your Last Name”;
}
if (txt_EMail.text = “”) {
trace(“E-mail address was accepted”);
} else if(txt_EMail.text != “”) {
trace(“Please Reenter your E-mail address”);
txt_LastName.text = “Please enter your E-mail”;
}
if (txt_NewPassI.text=“”) {
trace(“please check your password”);
} else if (txt_NewPassI.text=txt_NewPassII.text) {
trace(“The password was accepted”);
}
if (txt_Address.text != “”) {
trace(“Address was accepted”);
} else {
trace(“Please Reenter your Address.”);
}
if (txt_Phone.text != “”) {
trace(“Phone number was accepted”);
} else {
trace(“Please Reenter your phone number address”);
}
}