Pages

PHP $_POST

The PHP $_Post function is another way of grabbing the user inputted information.When a HTML form is used with its method="post" than the data of different elements of this form can be retreived by the PHP $_post function in the PHP page which is called on submission of the form.
The $_Post function gets the data with reference to the name attribute of the form elements e.g Textbox,Checkbox and Radio buttons.Unlike the $_GET function the PHP $_POST function makes the information transfer secure.The data is not visible to the user and it is not embedded in the URL and the amount of data to be shifted is almost unlimited too.
For more clear illustration let's go through to the following example...add the following code in a html file...

1 comments  

PHP $_GET

The PHP $_GET function is used to transfer information from page to page.Basically the PHP $_GET function retrieves variables embedded in the url after the ? sign.If more than two,these variables are separated with & sign.
If you are familiar with ASP.Net you will find PHP $_GET function as a replacement of Querystring.To get data with PHP $_GET is not a secure way of sending data from one page to another because all the information is visible in the url, but for simple use it is very handy.

0 comments