HomeDelphi-PHP Forums

How to update a MySQL database using AJAX

I’ve just finished creating my first screencast tutorial! :)

This Delphi for PHP tutorial shows you step by step how to create a Delphi for PHP web application to update a MySQL database using AJAX.

Asynchronous JavaScript and XML (Ajax) is built around the XMLHTTP Request Object (XHR) which forms part of the XML Document Management Model (XML DOM). This object is the core of the Ajax model and it allows JavaScript to access either XML or XHTML documents. The advantage of this model is that it allows HTTP requests to be made to the server WITHOUT refreshing the web page.

To view the video follow this link: MySQL and AJAX Tutorial

I had a lot of problems creating the tutorial with older versions of the VCL for PHP …. The version you need to use is version 65.

This version has fixed some renderer problems with the DBGrid component which this tutorial uses. To get this latest version of the VCL click here.

Check it out and let me know what you think?

9 Responses to “How to update a MySQL database using AJAX”

  1. Zocya Says:

    Nice work through exact amount of presented information. Once you’ve broken the ice (saying in Serbia) you can continue with excellent work. Thanks in advance.

  2. John Roth Says:

    Thanks for the nice work. I couldn’t find any decent tutorials for using MySQL with Delphi for PHP — the ones from CodeGear seem to concentrate on Interbase. So yours was very helpful.

  3. conray Says:

    where can i download the highres version or can someone e-mail me the source ,conrayvb@gmail.com , thanks

  4. admin Says:

    There is no higher resolution video … what you see is what you get. Sorry if the resolution isn’t high enough for you.

  5. slvarez Says:

    Good job!
    Can you prepare a tutorial to present us an example of master->detail->detail(2 detail levels) using ajax with dbgrid.
    …if tutorial is to much and lasts too long, a few hints perhaps…
    Thanks!

  6. jcooper Says:

    This is not an ‘update’ but an ‘insert’. Can you provide code that we can cut/paste that does the whole insert/update/delete

  7. Hensman Says:

    Excellent tutorial.. thanks

  8. Vladica Savic Says:

    Good job!

  9. Rolf Ernst Says:

    Hey, thanks a lot for demonstrating this. I know, folks always want more, so here is what would solve 95% of my work:

    a.) Have a dbgrid that displays the data rows.
    b.) Have an insert button for adding data (you showed)
    c.) Have the option to select a row (My rows have much more data than would reasonably be shown in the grid) and populate a detail display, preferably on the same page).
    d.) Be able to update from this detail form.
    e.) Of course, a delete function but I am sure I can figure this out quickly (I just got Delphi a couple of days ago).

    Having that would be really great as an example, maybe augmenting what you already did.

Leave a Reply