X
    Categories: PHP

Passing input parameters in PHP

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’]

}
Ivan Dimov: Ivan is a student of IT, a freelance web designer/developer and a tech writer. He deals with both front-end and back-end stuff. Whenever he is not in front of an Internet-enabled device he is probably reading a book or traveling. You can find more about him at: http://www.dimoff.biz. facebook, twitter