Created
November 29, 2018 07:40
-
-
Save junaidtk/a9c06779944442542e2de7b7474e0ac8 to your computer and use it in GitHub Desktop.
Form Handling
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
| if(isset($_POST['submit'])){ | |
| var_dump($_POST); | |
| } | |
| ?> | |
| <form method="post"> | |
| <input type="test" name="test"> | |
| <input type="test2" name="test2"> | |
| <div class="ttt" style="display: none;"> | |
| <input type="j1" name="j1" value="ttt"> | |
| <input type="j2" name="j2" value="yyy"> | |
| </div> | |
| <input type="submit" name="submit"> | |
| </form> | |
| if the form submission occure the input field inside the display none div will also submit the data. | |
| if the form contain more than one input field with same name, the name comes in later of the page will submit. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment