If input field has value Require another field – PHP September 25, 2022 by Tarik Billa You can do this: if (isset($_POST['twosfn']) && !empty($_POST["twohn"]))