php HOW To send item on the same page as the form
<p>Good day!
I am a newbie in php..
I made a form using html where I can input the grade of the student.
Then a php page to know if they pass or not.
My problem is how can i send back the reply on the html page. Example how can I send the You Failed status on my html page under the form.</p>

<p>My code is as follows:</p>

<pre><code> &lt;HTML&gt;
    &lt;BODY&gt;
    Please enter your grade (0-100 only):
    &lt;FORM ACTION="grade2.php" METHOD="POST"&gt;
    &lt;table border = "1"&gt;
        &lt;tr&gt;
            &lt;td&gt;Grade&lt;/td&gt;
            &lt;td&gt;&lt;input type="text" name="grade" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
    &lt;INPUT type="submit" name="submit" value="grade"&gt;
    &lt;/BODY&gt;
    &lt;/HTML&gt;


&lt;?php

$grade = $_POST['grade'];
IF ($grade&gt;=0 &amp;&amp; $grade&lt;=50){
    print "You failed";
} ELSE IF ($grade&lt;=60){
    print "You Passed! But Study Harder!";
} ELSE IF ($grade&lt;=70){
    print "Nice";
} ELSE IF ($grade&lt;=80) {
    print "Great Job";
} ELSE IF ($grade&lt;=90){
    print "Excellent";
} ELSE IF ($grade&lt;=100){
    print "God Like!";
} ELSE {
    print "Invalid Grade!";
}   

?&gt;
</code></pre>
