You can refactor you code even more.
You can do something like:
if (isset($_POST['submit_yes'])) {
... // some functionality which happens when submit_yes
}

if (isset($_POST['submit_yes']) || isset($_POST['submit_no'])) {
.... // do a redirection here. The repetitive block of code
}