Post Method in PHP

Post method is used for sending passwords or sensitive data. One thing about post method that we can send limited data and the maximum size is 8 MB.

Source code 

<?php
  if(isset($_POST['name']) &&isset($_POST['pd']) && isset($_POST['age']) && isset($_POST['sex'])) {
   $name = $_POST['name'];
   $pd = $_POST['pd'];
   $age = $_POST['age'];
   $sex = $_POST['sex'];
   }
?>
<html>
 <title> GET METHOD IN PHP </title>
  <body>
   <form action="index.php" method="POST">
    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

Post Method in PHP
Post 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