Created
June 7, 2018 07:04
-
-
Save niravmadariya/204344b83e20d1acefdef3574b3ae2a9 to your computer and use it in GitHub Desktop.
Given Number is Even or Odd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head><title>Check if the number is Even or Odd</title></head> | |
| <body> | |
| <form method="post"> | |
| Enter the Number:<br> | |
| <input type="number" name="number" id="number"> | |
| <input type="submit" name="submit" value="Submit" /> | |
| </form> | |
| <?php | |
| if($_POST['submit']){ | |
| $num = $_POST['number']; | |
| if($number%2==0) | |
| { | |
| echo "$number is Even Number"; | |
| } | |
| else | |
| { | |
| echo "$number is Odd Number"; | |
| } | |
| } | |
| ?> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment