PHP Pythagoras检查它是否是正确的答案

Hello i made this code below but i want it to be able to check if i guessed the answer good. If i insert 3 and 4 the answer is 5 but how do i let the code check if the answer "5" is right with the 2("3 and 4") input fields. So if all three input fields are correct. echo good and if not echo false. I am bad at explaining but i hope it's clear.

<form method="POST">
<label>Rechthoek verticaal</label>
<input name="vert"></input>
<label>Rechthoek horizontaal</label>
<input name="hor"></input>
<label>Schijne zijde</label>
<input name="schuin"></input>
<input type="submit" name="submit"></input>
</form>

<?php

if(isset($_POST['submit'])) {


$vert = $_POST['vert'];
$hor = $_POST['hor'];
$schuin = $_POST['schuin'];

$vert = pow($vert,2);
$hor = pow($hor,2);
$schuin = sqrt($vert + $hor);

echo $schuin;

}
?>

You need to check wheter sqrt($vert + $hor) is same as $_POST['schuin']

<form method="POST">
<label>Rechthoek verticaal</label>
<input name="vert"></input>
<label>Rechthoek horizontaal</label>
<input name="hor"></input>
<label>Schijne zijde</label>
<input name="schuin"></input>
<input type="submit" name="submit"></input>
</form>

<?php

if(isset($_POST['submit'])) {


$vert = $_POST['vert'];
$hor = $_POST['hor'];
$schuin = $_POST['schuin'];

$vert = pow($vert,2);
$hor = pow($hor,2);
if ($schuin == sqrt($vert + $hor)) {
    echo "Good"; 
}
else {
    echo "False"; 
    echo "<br> Answer  : ".sqrt($vert + $hor);
}

I'm not pretty sure to be understanding your problem, but if i'm, just compare the POST var with the calculated one:

echo ($schuin == $_POST['schuin'])?'good':'false';

PD: you are usingthe same var "$schuin" twice.