There are basically three ways in PHP to get user input. They are
- Using HTML Form
- Using URL values links
- Using COOKIES
In this tutorial I shall talk how to use HTML Form to get user input and retrieve that values from web server. Form is simple HTML form start with <form> tag and end with </form>. The form is posted to the server using POST method and each data user has entered is stored on a PHP super global variable $_POST. $_POST is an associative array that stores variables in key => value format. Let us take an example of simple HTML form with two fields: username and password.
تعليقات: 0
إرسال تعليق