<html><head></head> <body> <form action="PAGEName.php" method="post"> <table bgcolor="yellow" border="5" bordercolor="black"> <tr> <td> Is <input type="text" size="6" value="" name="input"> <input type="submit" value="even or odd?"> <br> Answer: <input type="text" size="8" value=" $n=$_POST['input']; print($n%2==1 ? 'odd' : 'even'); ?> " name="result"> <br> </br></br></td> </tr> </table> </body></form></html>
value
<? if ((int)$_POST['input'] % 2 == 1) { echo "odd"; } else { echo "even"; } ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)