$Name = $_POST['Name']; } /** * get the about street in english */ if (empty($_POST["Name_Amharic"])) { $errors[] = "Name in Amharic Should be filled"; } else { $Name_Amharic = $_POST['Name_Amharic']; } if (empty($errors)) { //make a specialization object $Specialization_C = new Specialization($General_Category, $Name, $Name_Amharic); //check if the specialization is registered before //if the specialization exists redirect, saying the specialization us repetition if ($encoder_con->Specialization_Exists($Specialization_C)) { encoder_place_redirect(Error_Type::SAME_REGISTERED_DATA); } //add the specialization to the databse $added = $encoder_con->Add_Specialization($Specialization_C); if ($added) { encoder_redirect_success(); } else { encoder_place_redirect(Error_Type::DATA_BASE); } } else { encoder_place_redirect(Error_Type::FORM); } } } }