Greatest among any two numbers using PHP

<html>
<head>
<title>Find the greatest number</title>
</head>
<body>
<form method="post" >
<label for="number1">Enter the first number:</label>
<input type="number" id="number1" name="number1"><br><br>
<label for="number2">Enter the second number:</label>
<input type="number" id="number2" name="number2"><br><br>
<input type="submit" name="submit" value="Find the greatest number">
</form>

<?php
if (isset($_POST['submit'])) {
$num1 = $_POST['number1'];
$num2 = $_POST['number2'];

if ($num1 > $num2) {
echo "The greatest number is " . $num1;
} else {
echo "The greatest number is " . $num2;
}
}
?>
</body>
</html>