<html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Hello!</title></head><body><?if (isset($_POST['sub'])){$a=(int) $_POST['num'];echo "the number u entered is ".$a;switch ($_POST['choi']){case "even-odd":{if ($a%2==0)echo $a." is a even number";elseecho $a." is a odd number";}case "prime":{$i=$a-1;$c=0;while ($i>1){if ($i%$a==0){$c=1;}}if($c==1)echo $a." is not prime number";elseecho $a." is a prime number";}}}else{echo "You did'nt enter the number or didn't make choice goback<br />";echo "<from action=\"numcheck.php\" method=\"POST\">\n";echo "<hr>enter number here<input type=\"text\" name=\"num\"><br />\n";echo "enter choice(operation)<br />\n";echo "<select name=\"choi\">\n";echo "<option>even-odd</option>\n";echo "<option>prime</option>\n";echo "</select><br />\n";echo "<input type=\"submit\" name=\"sub\"> ";echo "</form>";}?></body></html>