";
break;
case "2":
echo "Result: ", $_POST['firstNum']-$_POST['secondNum'], "
";
break;
case "3":
echo "Result: ", $_POST['firstNum']*$_POST['secondNum'], "
";
break;
case "4":
echo "Result: ", $_POST['firstNum']/$_POST['secondNum'], "
";
break;
default:
break;
}
?>
and with the same info.php as before
";
break;
case "2":
echo "Result: ", $_POST['firstNum']-$_POST['secondNum'], "
";
break;
case "3":
echo "Result: ", $_POST['firstNum']*$_POST['secondNum'], "
";
break;
case "4":
echo "Result: ", $_POST['firstNum']/$_POST['secondNum'], "
";
break;
default:
break;
}
?>
the problem with it is i think there is quite a lot of repeated code