GET and POST are the two most frequently used methods for accessing pages. In the first recipe you learned to make requests using GET method.
This recipe will make use of jQuery's
$.post() method to retrieve data from a PHP script. We will see a simple example where we will fill some data in a form and the data will be sent to PHP using the POST method. Sent data will be processed by PHP and then displayed in the browser.
Create a new directory named
Recipe4 under the
index.htmlin the newly created
Recipe4directory. In this recipe, we will use the same form that we created in the second recipe (Creating query string automatically for all form elements) of this ...