How to use POST function in PHP?
POST Method is different from GET Method that we have used previously.Here the information sent to the server is not visible in the URL so this method provides security factor.
//Program for POST function in PHP
<form action="Test1.php" method="post">
Your Name:<input type = "text" name = "yourname"/>
Last Name:<input type = "text" name = "lastname"/>
<input type = "submit"/>
This is Test1.php
/*Output of the above program is:
On clicking Submit button you will se the following:
And also URL wil be visible as:
In the above URL there is no information visible which is sent by the user,So Post method is more secure compared to get Method.