Ajax

AJAX loosely stands for Asynchronous JavaScript and XML.Basically AJAX is a new technique for creating better, faster,reliable and more interactive web applications and web pages with the help of XML, HTML, CSS and Java Script.and AJAX is become popular in 2005 by Google and other big web developers
Conventional web application transmit information to and from the server using synchronous requests(randomly request). This means you fill out a form, hit submit, and get directed to a new page with new information from the server without reloading and refreshing whole page like comment section
With AJAX when you hit the submit button firstly JavaScript will make a request to the server, interpret the results and update the current screen. In the purest sense, the user would never know that anything was even transmitted to the server.

PHP with AJAX example


Now we will see how can be easy to access a information from database using PHP with AJAX
Step-I
We are going to create a database using mysqlquery (we are using mysqldatabase)
// create database 'databasename' like below
CREATE DATABASE dophptalks;
Step-II
Now We are going to create a table using mysqlquery (we are using mysqldatabase)
// create table 'table name' inside database like below
CREATE TABLE ajax (
   id INT(6) NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `name` varchar(50) NOT NULL,
   `age` int(11) NOT NULL,
   `sex` varchar(1) NOT NULL,
   `wpm` int(11) NOT NULL
);

No comments:

Post a Comment