22/12/2014

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

No comments:

Post a Comment