-
Book Overview & Buying
-
Table Of Contents
PHP jQuery Cookbook
By :
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 chapter2 directory.
Create a file named index.html in the newly created Recipe4 directory. 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 chapter. So write the HTML that will create a form with multiple controls.
<html>
<head>
<title>Sending data through post</title>
<style type="text/css">
ul{ border:1px solid black; list-style:none;margin...
Change the font size
Change margin width
Change background colour