A Php program to execute the get and post. Using this program we can get and post program in php. The POST method uses HTTP headers to send data. The data is encoded as specified for the GET method and stored in the QUERY STRING header. The data size that can be sent with the POST method is unrestricted. Both ASCII and binary data can be sent using the POST method.
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
Name: <input type="text" name="fname">
if ($_SERVER["REQUEST_METHOD"] == "POST")
$name = $_POST['fname'];
echo "Name is empty";