PHP Tutorials: jQuery: Get data from MySQL Database without refreshing

Posted by: Admin  :  Category: Php

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

Outputs the age of a specified name typed in a form, without a page refresh. It’s easy, using jQuery! Great for beginners to AJAX style methods. FORUM phpacademy.org TWITTER twitter.com BLOG blog.phpacademy.org
Video Rating: 4 / 5

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

25 Responses to “PHP Tutorials: jQuery: Get data from MySQL Database without refreshing”

  1. uldtot Says:

    Nice tutorial. Well explained and works

  2. RockstahRolln Says:

    What a TERRIFIC Tutorial!! Thanks a LOT as I found this Tut extremely useful!

  3. yonoytuunoodos Says:

    it doesnt work when i hit enter

  4. snupiix Says:

    so this here, is here and its inside here, so here is output from here. Remember that this here, which is here, is here. 😀

  5. MrPampas2 Says:

    This is a great tutorial, and I’m certainly going to subscribe to your channel. By the way I had to rewrite your function (with the combined help of comments on here.

    I’m running Firefox Beta 4.0 and neither of the individual comments worked; however when I combined them, I got them to work; so in case anyone else is looking for the solution to the firefox problem; here’s the full function re-written:

    $.post(‘data.php’, { name: $(‘form[name=form] input[name=name]’).val() },

    Good luck

  6. janebbdou06 Says:

    how to clear the result after search because i have the first name of client database display always. I have used wildcard “%$username%”

  7. clickatron Says:

    great work. simple and to the point.

  8. Timzorize Says:

    Good tutorial except that you’re teaching us to write wrong code. This code won’t work in Firefox 4 if you’re haveing a doctype declared which you absolutely should have.

    To solve the “form is undefined” problem you should type the code in the correct way:
    $.post(‘data.php’, {name:$(“#form”).find(“input[name=name]”).val()},

  9. scion3713 Says:

    Thanks for this video man. Keep up the good work.

  10. smartmo21 Says:

    Great Tutorial … However the code doesn’t run on Firefox 4 !?? Does anyone know how to fix that !??

  11. Itaysid Says:

    I had some problems with this in Firefox 4, apparently it tells me that the name of the form is not defined, tried to give the form an ID but still no good. tool me a while till I switched to Chrome and saw that it worked

  12. MaxMeents Says:

    Considering your targeted audience I thought the redundant naming a major failing

  13. IJustPostOnYou Says:

    @brahimouvic88 I’m sorry i havent tryet it yet xD
    But i can try makeing it^^
    Try send me a PM message on my channle with your email in it, if i sucseed i’ll send you the source code^^

  14. brahimouvic88 Says:

    @IJustPostOnYou Hey there am having same project ,i have to create a website search engine,i have to adapt lucene or solr for my university website
    is there any thing u did or u suggest me to do if u are advanced in it

  15. IJustPostOnYou Says:

    I’m just curious but is it posebel to use this for a search enging with link, decription and other data?
    Greate tuu tho^^

  16. elboru13 Says:

    man! your videos are awesome! english is not my first language and I have some problems with the british accent, but your pronuntiation and your voice is so clear!
    and the way you introduce everyone to new techonlogies is just perfect!

  17. Askmegabe Says:

    Excellent tutorial!

  18. kook123123 Says:

    great tutorial !

  19. JJDR04 Says:

    @phpacademy

    Great tutorial.

    Is there a way I can modify this to get data from php functions insted of a Form?
    For instance, I have a website that has a menu that is called from a function called displayMenu(). And the contentet is also displayed with a second function called displayContent().

    So my index file has all its content pulled from these two functions (no forms). How can I adapt it to work this way? I have tried misserably to make it work. I just need to pss these through JQUERY.

  20. egyptsmina Says:

    it’s the best you are Great thanks alot

  21. hasan4it Says:

    I want to search different thing from the database at the same time.
    search with name and email for example.
    so how we can pass the other variable value using the same code

  22. 01718433901 Says:

    COOL ! LOOKING FOR MORE EXAMPLE …

  23. JonLeeSmith Says:

    Nice tut, but if you post the form with enter it seems to bugger it up?

  24. fishisstyle Says:

    Wow, great video tutorial! Nice 😀

  25. p2xt Says:

    this is great… there is a small problem (in ff3 opera chrome — ie loads fine) form is not defined… so if you replace { name: form.name.value } with { name: $(‘form[name=form] input[name=name]’).value } it should load just fine.
    Thx by the way 🙂 this got me started

Leave a Reply

*