How to keep values inside input fields after generating table while using php post method?

I’m trying to figure out how to keep values of input elements inside the boxes after php generates table. Code is listed below.

 <form action="zadatak_12-4.php" method="post">
        <label for="nA">Prvi broj: </label>
        <input type="number" id="nA" name="nA">
        <label for="nB">Drugi broj: </label>
        <input type="number" id="nB" name="nB">
        <button type="submit" >Generiraj</button>
    </form><br>

Php

<?php
    $nA =-1;
    $nB =-1;
    if(isset($_POST['nA'])) $nA = $_POST['nA'];
    if(isset($_POST['nB'])) $nB = $_POST['nB'];
    
    if(!is_numeric($nA)) $nA = -1;
    if(!is_numeric($nB)) $nB = -1;

    if(($nA != -1)&&($nB !=-1))
    {
        $odBroj = $nA; $doBroj = $nB;
        if($nB > $nA) { $odBroj = $nB; $doBroj = $nA;}
            $pom  ="<table class='tablica'>";
            $pom .="<tr><th>Broj</th><th>Kvadrat</th><th>Alert poruka</th></tr>";
            
            for ($i = $odBroj; $i >= $doBroj; $i--)
            {
            $pom .= "<tr><td>".$i."</td><td>".($i*$i)."</td><td><span class='glumiLink'>Poruka</span></td></tr>";
            }
            $pom .="</table>";
        } else {
            $pom  ="<p>Pogrešno uneseni ili nedefinirani parametri!</p>";
        }
    ?>