This section contains the detail about GET Method in PHP .
The $_GET Method in PHP
The $_GET function in PHP is used to gather data of form submit with method="get". The data sent using get method is visible in browser's address bar.
For sending username & password , get method is not secure. It also has limits on the amount of information to send. Given below form uses get method for sending data :
<form action="registration.php" method="get"> Name : <input type="text" name="name" /> Address : <input type="text" name="address" /> <input type="submit" /> </form>
Fetching form data sent via GET method
You can fetch value of submitted form in a PHP page using $_GET method as follows :
Your Name :<?php echo $_GET["name"]; ?>.<br /> Address :<?php echo $_GET["address"]; ?>
The above lines display the name & address values of submitted form.
[ 0 ] Comments