if((!empty($_POST["education_country_1"]) || !empty($_POST["education_state_1"]) || !empty($_POST["education_city_1"])) && (empty($_POST["education_school_1"]) && empty($_POST["education_degree_1"]))) { $error .= "Please enter your school name and degree when entering your education background.|"; } if(!empty($_POST["education_school_1"]) && empty($_POST["education_degree_1"])) { $error .= "Please enter your degree when entering your education background.|"; } if(empty($_POST["education_school_1"]) && !empty($_POST["education_degree_1"])) { $error .= "Please enter your school name when entering your education background.|"; } if($_POST["education_country_1"] == 'US' && empty($_POST["education_state_1"])) { $error .= "Please specify state when entering your education background.|"; } if(!empty($_POST["education_country_1"]) && empty($_POST["education_city_1"])) { $error .= "Please enter city when entering your education background.|"; } if(empty($_POST["education_country_1"]) && !empty($_POST["education_city_1"])) { $error .= "Please specify country when entering your education background.|"; }