PHP Form HandlingWe can create and use forms in PHP. To get form data, we need to use PHP superglobals $_GET and $_POST. The form request may be get or post. To retrieve data from get request, we need to use $_GET, for post request $_POST. PHP Get FormGet request is the default form request. The data passed through get request is visible on the URL browser so it is not secured. You can send limited amount of data through get request. Let's see a simple example to receive data from get request in PHP. File: form1.htmlFile: welcome.phpPHP Post FormPost request is widely used to submit form that have large amount of data such as file upload, image upload, login form, registration form etc. The data passed through post request is not visible on the URL browser so it is secured. You can send large amount of data through post request. Let's see a simple example to receive data from post request in PHP. File: form1.htmlFile: login.phpOutput: Next TopicPHP Include File |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India