Ticker

6/recent/ticker-posts

PHP (Post Method)

POST METHOD IN PHP

In the GET method, data sent to server as a package in a separate communication with the processing script and data sent through POST method will not visible in the URL.






POST METHOD ADVANTAGES
a. POST method never show data in URL, therefore its more secure as compare of GET method.

b. There is a much larger limit on the amount of data that can be passed and one can send text data as well as binary data (Uploading a file) using POST method.


POST METHOD DISADVANTAGES
a. POST method is slow than compare of GET method.

b. As data send by POST method is not visible in the URL, so it is not possible to bookmark the page with specific query.

POST METHOD EXAMPLE
<form action="#" method="post">
Enter your name: <input type=text name=n>
<input type="submit" name="sub">
</form

<?php
if(isset($_POST['sub']))
{
echo"Your name is:".$_POST['n'];
?>








Post a Comment

0 Comments