I want to check if an entered value is 10 or not(and if the value is 10, I want the result to be sent to "send.php"). What am I doing wrong?
<?php  $cod1=rand(0, 10); 
    $cod2=10-$cod1; ?>   
    <form action='send.php'  method='post' onsubmit='f1(this)'>
    Please enter the value of <br> <?php echo $cod1 ?> + <?php echo $cod2 ?> in the following box
    <input type="text" name="xrezultat" id="xrezultat" class="box" size="32"/>
    <input name="Submit1" type="submit" class="butt" value="Trimiteti">      
    <input name="Submit2" type="reset" class="butt" value="Stergeti ">
    </form>
    <Script> 
    function f1(input) 
    {    
    if(document.getElementById("xrezultat").value!=10)   
    aux==false;
     if (aux == true)
    {
       return true;
    }
       else
    {
        alert ( "Please enter the correct value" );
        return false;
                 }
    }
    </script>
 
     
     
    