You May Like

Subscribe to RSS through Email:

Enter your email address:

RSS Subscription

Retrieving database information with AJAX, PHP and MySQL Print E-mail
Tag it:

Retrieving database information with AJAX, PHP and MySQL - By somecoders

With the recent popularization of AJAX (Asynchronus Javascript And XML), it is now unnessecary to reload a page with the same basic layout, just to get new content. You can use AJAX to retrieve just the content without reloading the page, then change the value of a content area.

First of all, to use AJAX you must understand how it works. AJAX is JavaScript that can run through the "AJAX Engine" and by doing so, retrieve data from a remote page through HTTP, without having a page reload. It is similar to PHP's file_get_contents(), however it can be done through JavaScript as a client-side script.

The first thing we need, is a php file that we will call with AJAX. It doesn't have to be PHP, but since it is the most popular server-side language, that is what we'll use. If you have decent knowledge of another language you would like to use instead, I'm sure you could translate the code. In this file, we will use a GET variable to determine the MySQL query we need to perform. We are using GET because it is accessible by AJAX. The great thing about it is that the file you are calling can be incredibly simple, and just be straight textual information


  No Comments.

< Prev   Next >

Who's Online

We have 13 guests online

Subscribe To

 Subscribe in RSS

Follow me...

Top 10 Most Downloaded

HTML5 Games for Phone & Tablet

Job Vacancies

  • Lowongan Kerja Beauty Advisor Samarinda
    Usia 20-28 tahunMemiliki ketertarikan pada industri kosmetikDiutamakan memiliki minimal 6 bulan pengalaman di bidang sales / retailMinimal pendidikan SMK/SMU atau sederajatBepenampilan menarik ramah dan energikBersedia bekerja saat weekend amp hari libur nasional
  • Lowongan Kerja Admin Accounting
    Wanita maksimal usia 30 tahun sehat jasmani dan rohani rajin jujur dan dapat bekerja sama dalam timBerdomisili daerah jakarta pusat jakarta barat dan jakarta utaraLulusan SMK Akuntansi dengan sertifikasi junior accountingMemiliki pengalaman bekerja ...
  • Helper Operator Gudang
    Tugas / Tanggung Jawab : Melakukan Kegiatan Operator Gudang / Warehouse Staff Setiap harinya Melakukan Packing Barang Melakukan Sortir Barang Melakukan Penyusunan Barang Melakukan Pemeriksaan Muat dan Turun Barang Posisi Info Lebih Lanjut Silahkan Kunjungi Helper Operator Gudang