Created
September 21, 2019 16:47
-
-
Save phpfiddle/35ad295641aaba48f6a3783184577509 to your computer and use it in GitHub Desktop.
[ Posted by Pravallika ] WhatIsToday
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
| What day is today?: | |
| <form method="post" action=""> | |
| <input type="text" name="value"> | |
| <input type="submit"> | |
| </form> | |
| <?php | |
| if (isset($_POST['value'])) { | |
| $day = $_POST['value']; | |
| } | |
| else { | |
| $day = ""; | |
| } | |
| echo $day; | |
| if (strcmp($day,"Sunday")==0) | |
| { | |
| echo ": Singing class"; | |
| } | |
| if (strcmp($day,"Monday")==0) | |
| { | |
| echo ": Dance class"; | |
| } | |
| if (strcmp($day,"Tuesday")==0) | |
| { | |
| echo ": Piano class"; | |
| } | |
| if (strcmp($day,"Wednesday")==0) | |
| { | |
| echo ": Dance class"; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment