how can i input a validation PHP
<p>Good day!</p>

<p>How can I produce an error if i input a letter instead of number because characters can still be encoded.... My code is as follows:</p>

<pre><code>&lt;HTML&gt;
&lt;BODY&gt;

Please enter your grade (0-100 only):
&lt;FORM ACTION="grade.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 status"&gt;
&lt;/FORM&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;

&lt;/BODY&gt;
&lt;/HTML&gt;
</code></pre>
