In this brief article, we will see how to work with forms and inputs in PHP.
Using HTML forms, you can pass parameters to the PHP back-end. Let us examine the following form:
Now, this form will perform a GET submission. In PHP, you can get the text input with the following code:
If (array_key_exists(“name”, $_GET)) { // do something with $_GET[‘name’] }