POST Method

POST Method

The $_POST Variable:

The $_POST variable is an array of variable names and values sent by the HTTP POST method.

The $_POST variable is used to collect values from a form with method=”post”. Information sent from a form with the POST method is invisible to others and has no limits on the amount of information to send.

Advantage:
* Variables sent with HTTP POST are not shown in the URL
* Variables have no length limit

Example:

/*** Login.php****/
<form action=”result.php” method=”post”>
name: <input type=”text” name=”name” />
Rollno: <input type=”text” name=”no” />

</form>

when click submit button it goes to result.php.
we can get $_POST variable value using print_r($_POST);
statement in result.php.

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.