I am inserting and updating some values through a form with radioboxes and textarea. Basically the query works fine but if user does not select any radio boxes or leaves the text area empty, I want an error message to pop up, instead of real php errors of undefined.... blah blah.
Sorry for this weird layout, but this text editor is super problematic with editing..
    $var1 = $_POST['var_1'];
    $var2 = $_POST['var_2'];
    $var3 = $_POST['var_3'];
    
    if(isset($_POST['button_name'])) {
    
    if(query1 && query2) {
      echo "Successfully inserted and updated"</h3>";
    } elseif(empty($var1) && empty($var2) && empty($var3)) {
      echo "not selected. Please Try Again"</h3>";
    } else {
      echo "failed to sent cause of query issue";
    }
} else {
    echo "nothing was selected";
}
 
     
    