Monday 22 December 2014

GET Method in PHP

Structure of the Problem Requirements 

In this problem we will learn how to implement get method in PHP. In get method parameters remain in browser history because they are part of the URL. Get Methods 's request can be bookmark. Get method should be used to retrieve data. Get method should not be used when sending passwords or other sensitive data. Here is the complete source code of this problem which help you in better understanding. 

Source Code 

<?php
if(isset($_GET['name']) &&isset($_GET['pd']) && isset($_GET['age']) && isset($_GET['sex'])) {
$name = $_GET['name'];
$pd = $_GET['pd'];
$age = $_GET['age'];
$sex = $_GET['sex'];
}
?>
<html>
<title> GET METHOD IN PHP </title>
<body>
<form action="index.php" method="GET">
Name: <br> <input type="text" name="name" ><br>
Password: <br> <input type="password" name="pd" ><br>
Age: <br> <input type="number" name="age" ><br>
Sex: <br> <input type="text" name="sex" ><br>
<br> <input type="Submit" name="Submit" ><br>
</form>
</body>
</html>

Output of the Program

Get Method in PHP
Get Method in PHP

Share it Please
asad

About Author!

Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.

0 comments:

Post a Comment