Tuesday, January 26, 2010

11:37 PM
The built-in $_POST function is used to collect values in 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.

Note: However, there is an 8 Mb max size for the POST method, by default (can be changed by setting the post_max_size in the php.ini file).



<form action="process.php" method="post">
<select name="item">
<input name="quantity" type="text" />

In PHP we use that by using.,

$quantity = $_POST['quantity'];
$item = $_POST['item'];

The PHP $_REQUEST Function

The PHP built-in $_REQUEST function contains the contents of both $_GET, $_POST, and $_COOKIE.

The $_REQUEST function can be used to collect form data sent with both the GET and POST methods