Get JSON data using jQuery AJAX from a PHP page


Today I’ll show you simple procedure to get JSON data using jQuery AJAX from a PHP page.

Dependencies: Put jQuery library in same folder named after jquery.js. You can get jquery here .
Need a server to run php.

Now put jquery.js, AJAXtestJSON.php and AJAXJSONdata.php in same folder in server.

Here is the code of AJAXtestJSON.php

Here is the code of AJAXJSONdata.php

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s