Finding the Nth Fibonacci number through input field PHP
<p>I'm having some issues getting the input code to work with the equation. I've been trying for a while (I'm new to coding) and searching, while not being able to make it work in any way. This is what I ended up with. Can anyone help me? Thanks in advance.</p>

<pre><code>&lt;!DOCTYPE HTML&gt;
&lt;html&gt; 
&lt;body&gt;

&lt;form action="" method="post"&gt;
&lt;br /&gt;Choose a number to be the nth in the Fibonacci sequence: &lt;input type="number" name="fibnum"&gt;
&lt;input type="submit"&gt;
&lt;/form&gt; &lt;br /&gt; &lt;br /&gt;

&lt;?php


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


    $fibnum = $_POST['fibnum'];


    function fibRec($fibnum){

        if ($fibnum &lt; 0){
        echo "There are no Fibonacci numbers of negative values.";
        }
            elseif ($fibnum == 0){

                echo "0";
            }

                elseif ($fibnum == 1){

                    echo "1";
                }

                    else {

                        $sum = fibRec($fibnum-1)+fibRec($fibnum-2); 
                        echo $sum;
                    }

    }
        $fib = fibRec($fibnum); 
        echo $fib;          

}           
?&gt;    

&lt;/body&gt;
&lt;/html&gt;
</code></pre>