Last active
December 10, 2019 23:00
-
-
Save simeondahl/4482698 to your computer and use it in GitHub Desktop.
PHP dropdown menu.
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
| 0.0.1 -> 0.0.2 | |
| general: | |
| - Removed PHP code from index.php | |
| - Added a new file with php code in called "function.php" | |
| 0.0.1 | |
| general: | |
| - Added the new code to get value of a dropdown box (PHP) |
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
| <?php | |
| // here starts the php | |
| if (isset($_POST['show_dowpdown_value'])) { | |
| echo $_POST['dowpdown']; // this will print the value if downbox out | |
| } | |
| ?> |
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>Sitename</title> | |
| </head> | |
| <body> | |
| <form action="function.php" method="post"> | |
| <!-- here start the dropdown list --> | |
| <select name="dowpdown"> | |
| <option value="1">Yes</option> | |
| <option value="2">No</option> | |
| </select> | |
| <input type="submit" name="show_dowpdown_value" value="show"/> | |
| </form> | |
| <?php include("function.php"); ?> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment