Yes, an if/else is the way to go. You can accomplish this in-line with the ternary operator.
Change this:
$total = ($_POST['one'] + $_POST['two'] + $_POST['three'] + $_POST['four']
+ $_POST['five'] + $_POST['six'] + $_POST['seven'] + $_POST['eight']+
$_POST['nine'] + $_POST['ten']+ $_POST['eleven'] +
$_POST['twelve']+ $_POST['thirteen']);
To this:
$total = ($_POST['one'] + $_POST['two'] + $_POST['three'] + $_POST['four']
+ $_POST['five'] + (($_POST['four'] > 0) ? 0 : $_POST['six']) + $_POST['seven'] + $_POST['eight']+
$_POST['nine'] + $_POST['ten']+ $_POST['eleven'] +
$_POST['twelve']+ $_POST['thirteen']);
This assumes that your $_POST values are integers.