How to submit a form to its self on sololearn?
I am try to get a user input and post it to the screen. Here is my code. <script> function validateForm() { var x = document.forms["NumInput"]["number"].value; if (isNaN(x) || x < 1 || x > 5) { alert("Please Enter A Number Between 1 And 5!"); return false; } } </script> <?php $CompNum = rand( 1,5); $UserNum = $_POST['number']; ?> <?php echo"Hello,", "<br/> " ,"Can you Guess the number your computer is thinking?","<br>"," Pick a number 1 - 5."; ?> <form name="NumInput" action='#' onsubmit="return validateForm()" method='post'>Enter Your Number:<input type='text' name='number'><input type="submit" value="Submit"> <br/> <?php echo "<br/>Your Number Is: " , $UserNum; if($UserNum == $CompNum){ echo"<br/><br/>You Win! Nice Job!"; echo"<br/>Your Computer's Number Is:" , $CompNum; }else{ echo"<br/><br/>Better Luck Next Time!"; echo"<br/>Your Computer's Number Is:" , $CompNum; } ?> any suggestions on how to do this if it is even possible on Sololearn. Thanks Everyone!