Web Design Blog

This is where we store some of our Web Development thoughts, tips and tricks, just because we like to share.

Ajax JQuery / PHP – Refresh Table When Inserting Row Into a MySQL Database

I’ve had a few people asking me how to refresh a table (not the entire page) when inserting rows into a MySQL database, so I thought I’d quickly put together a small demo.

Here’s a basic demo of what I’m talking about. If you populate the form and press “Submit” you’ll notice the table updates without the entire page refreshing.

Refresh Table When Inserting Row Into a MySQL Database

Demo

Ajax JQuery / PHP – Refresh Table Demo.

I’ve put a limit of 20 entries on the demo version, to save myself from being abused!!

Download

Download Ajax JQuery / PHP – Refresh Table

Please note, I have merely provided a guide. You are strongly advised to implement your own server and client side error checking.

I hope you find the code useful :)

09 Mar 2010 / 15 Comments / jQuery Scripts & Helpful Snippets / by Maruf

15 Comments

  1. sekay
    29/05/2010
    1

    Wow wonderful, thank you :)

  2. teachsanjay
    16/07/2010
    2

    thanks man! im looking to this one..

  3. Amal
    31/07/2010
    3

    almost what i was looking for!! is it possible to refresh the tables automatically if a condition is met in one of the columns? eg. delete row when fifth column=some value

  4. Catzie
    10/08/2010
    4

    I’ve been looking for this. Glad I found your page :)

  5. defoe
    14/09/2010
    5

    cool! just what am looking for :)

  6. esteban
    30/09/2010
    6

    hey man this example not working wit local file jquery-1.4.2.min.js or derivates.

    just with the link you put in te script

  7. nwt
    21/12/2010
    7

    thanks man!

  8. chepy
    30/12/2010
    8

    thanks bro..

  9. 17/01/2011
    9

    cool, this is what i looking for …

    thank you very much . . .

  10. Sanjeev
    16/02/2011
    10

    Thanks for this code. I was actually looking for this.

  11. Mark
    06/03/2011
    11

    Simple and nice guide! thanks a lot fellow!

  12. Lutiano
    29/06/2011
    12

    Thanks a lot, this is exactly what i needed!!

  13. 05/07/2011
    13

    Wow, this worked perfectly the first time. Your explanation was simple and to the point. THANK YOU, THANK YOU!

  14. Josh
    21/07/2011
    14

    Thanks a lot. This was so helpful you have no idea. I spent hours looking for a way to speed up my system. You’re the man.

  15. 19/08/2011
    15

    Thanks a lot but I have the same question as Amal: How can we “forget” the click on the submit button if we only use checkboxes for example?

Leave a Reply

© 2012 BrightCherry :)