How to use POST Method in php

PHP

Post method is the best method to use , it has more advantages then that of disadvantages. Post Method hides the data from normal users. Post Method has no limitations for the string lenght or data limits. Post Method load all the data in the background so normal user cant see any thing. We need to set Post in method for the form.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Example for Using POST Method in PHP</title>
</head>
<body>
<!--We will create one simple form with two fields first name and last name-->
<!--This is the simple example for POST method with form in php-->
<!-- We need to set method="post" for the Get Method-->
<form name="myform" action="" method="post" id="myform">
<p>
<label>First Name</label>
<input type="text" name="fname" id="fname" value="" />
</p>

<p>
<label>Last Name</label>
<input type="text" name="lname" id="lname" value="" />
</p>
<p>
<input type="submit" value="Submit" name="save" id="save" />
</p>

</form>
<?php
if(isset($_POST['save']))
{
echo 'Your Name-'.$_POST['fname'].' '.$_POST['lname'];
}
?>
</body>
</html>
-->