Create form for entering numbers
(condition.html)
<!DOCTYPE html>
<html>
<body bgcolor="orange">
<form method="POST" action="condition.php">
<h1>Enter Number:<input type="number" name="n1" style="width:80%;"><br>
<input type="submit"><br>
</form>
</body>
</html>
(condition.php)
<html>
<body bgcolor="orange">
</html>
<?php
$a=$_POST["n1"];
if($a%2==0)
echo "<h1>Its even number";
else
echo "<h1>Its odd Number";
?>
Comments
Post a Comment