how to stop reloading page with every new form input (submit) in php?
<p>I want to  make script that allows user guessing numbers until hits the right one. The idea is that php "imagine" one number using <strong>rand()</strong>.User has unlimited number of hits. But the problem is that user has to find the very same number as php "imagine" at the beginning of his quest, and my script reloads every time I input new number and always outputs new random number. What should I do in order to fix this problem? Thanks in advance.</p>

<pre><code>$r= rand("1","10");

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

$unos = $_POST['unos'];
if ($unos==$r){
echo "Congratulations you did not miss the center";
}
elseif ($unos&lt;$r){
echo "your number is less then quested number&lt;/br&gt;try again";

}
elseif ($unos&gt;$r){
echo "your number is higher then quested number&lt;/br&gt;try again"; 
}

}
else{
echo "Go!";
}
</code></pre>

<p>html</p>

<pre><code>&lt;form action="?" method="post"&gt;
&lt;input type="number" name="unos" id="unos"&gt;
&lt;input type="submit" value="Start"&gt;
&lt;/form&gt;
</code></pre>
