GET Method in PHP

Get Method 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.


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 on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment