SQL PHP HTML ASP JavaScript articles and free scripts to download If you are facing any problem in viewing this page, please tell us
 

Ajax & PHP scripts


The popularity of Ajax is increasing day by day. One of the best example as used by google is google suggest. Here based on the user keywords entered at search box, google returns matching keywords or extension of this words as searched before by users.

Ajax the short form of asynchronous JavaScript and XML we will try to learn by studying some examples here. As you know Ajax is itself not a scripting language so we will be using our script PHP for programming here and other languages in different sections.

Checking Script support

As Ajax depends on client side scripting, we need to check the script support is enabled ( in browser ) or not. Here is the code we can use to display message if scripting is disabled.

<noscript>Your browser does not support scripts, you have to enable it to run this page</noscript>

Let us start with some examples on uses of Ajax

XMLHttp object

To work in Ajax we have to create XMLHttp request objects based on type of browser. This object we will use to pass data and collect the data from the server.

Form submission in GET method

Using GET method we can submit form details to a backend PHP script using Ajax

Dependant list box using Ajax

We will be using Ajax to send the selection value of first drop down list and then based on this value we will send one more dependant drop box.Read More

Validation of email address

We will use Ajax to pass email data as entered by user and then this address is checked with a validation code written in PHP. Read More

Customer Details from Server

Using Ajax we can Post customer id to server and collect the matching details of the customer. . Read More

PHP MySQL Paging script using AJAX

We can create a paging script by breaking records into pages using Ajax, PHP and MySQL database. . Read More

Message Display by using Ajax & PHP

We need to communicate with visitors while processing data in server. Learn the basics of displaying, hiding messages using layers by DIV tag.

Ajax based progress bar

The status of script exection can be shown by a growing progress bar. This is the basic of how to display a growing progress bar.

MySQL PHP Ajax based progress bar

Data is taken from a MySQL table and status is updated from the main script.

Json

What is Json ? How to know Json support is available in our PHP or not? What we can do with our Json functions? . . Read More

Keyword Search in MySQL table as we type

We can get the result from our database table by applying search command. Here data is posted to backend query as we type and results are displayed.

Records based on selection of drop down list box

Records of a sub-category can be displayed after selection of a category from a drop down list box.
Further readings
Ajax & PHP scripts
Creating XMLHttp object in different browsers
Sample Code: Get Method of Ajax form submission
Dependant drop down list box using Ajax & PHP
Email validation using Ajax in a form
Getting customer details by entering customer id using Ajax
Progress Bar using Ajax
Progress Bar using MySQL PHP & Ajax
Displaying Message at client side using Ajax & PHP

Json support in PHP
json_encode to generate Json string from PHP Array data
Json Data formatting to return database records to main script
Searching MySql database as we type using Ajax
Displaying all records based on selection of a drop down list box

sumit18-02-2009
thanx
dhirendra22-04-2009
post comment
test07-05-2009
testing the form
kamal24-07-2009
testing the data.
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked

Sections
PHP
JavaScript
ASP
HTML
SQL
Photoshop
Articles SEO
PHP Tutorials
Ajax & PHP
PHP Monthly Planner
PHP Introduction
Loops & structure
Array
Date & Time
Functions
Form Handling
File Handling
Math Functions
String Functions
GD Functions
Comment Posting
Content Management
PHP & Ajax
Popular Tutorials
Drop down list
File Upload
Signup script
Member Login
Line Graph
PHP MySQL Paging
PHP Calendar
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.