I am learning MySQL database language & HTML, PHP with javascripts. I don't have any idea of AJAX technology.
My question is can a webpage fetch information from MySQL database using AJAX Technology?
Thanks.
I am learning MySQL database language & HTML, PHP with javascripts. I don't have any idea of AJAX technology.
My question is can a webpage fetch information from MySQL database using AJAX Technology?
Thanks.
Hello & welcome to TechArena community.
To answer your question YES it is possible to fetch records on a webpage from MySQl database using AJAX technology.
Ajax, which stands for Asynchronous Javascript And XML.
It is a group of interrelated web development techniques used on the client-side to create interactive web applications or rich Internet applications. With Ajax, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page. The use of Ajax has led to an increase in interactive animation on web pages[1][2] and better quality of Web services due to the asynchronous mode. Data is usually retrieved using the XMLHttpRequest object. Despite the name, the use of JavaScript and XML is not actually required, nor do the requests need to be asynchronous.[3] (wiki)
PHP Example - AJAX and MySQL
AJAX can be used for interactive communication with a database.
The following example will demonstrate how a web page can fetch information from a database with AJAX technology.
You can see the working of this code on w3schoolsCode:<html> <head> <script type="text/javascript" src="selectuser.js"></script> </head> <body> <form> Select a User: <select name="users" onchange="showUser(this.value)"> <option value="1">Peter Griffin</option> <option value="2">Lois Griffin</option> <option value="3">Glenn Quagmire</option> <option value="4">Joseph Swanson</option> </select> </form> <br /> <div id="txtHint"><b>Person info will be listed here.</b></div> </body> </html>
I hope you learn this at the site.
All the best.
Bookmarks