PHP Tutorials: jQuery: Get Data from MySQL Database without Refreshing

7th of September 2013 22

PHP Tutorials: jQuery: Get Data from MySQL Database without Refreshing


Don’t want to watch on YouTube? Download at https://phpacademy.org/course/get-data-from-mysql-database-without-refreshing-page Outputs the location of a spec…

Filed under § jquery ajax — Tagged with , , , , , , ,

Share it!

Was it good for you to?

Sponsors

Support for the site!

No sponsors at the moment.



22 great comment(s) for this post

  1. Domuta Marcel 1:47 pm 7/09 of 2013

    An verry good tutorial for an begginer like me. Thanks :)

    Reply
  2. iSuper Duper 2:18 pm 7/09 of 2013

    hi alex , how can i make auto scrolling data from MySQL ? using jQuery

    Reply
  3. Karl Pokus 2:23 pm 7/09 of 2013

    would return (JSON_encoded obj) work as well as echo?

    Reply
  4. dashing3201 2:42 pm 7/09 of 2013

    very good tutorial. thanks

    Reply
  5. jayadev akkiraju 2:48 pm 7/09 of 2013

    I get this warning..Did anyone get the same error and resolved it??

    warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:xampphtdocsjqueryajaxname.php on line 11

    Warning: mysql_result() expects parameter 1 to be resource, boolean given in C:xampphtdocsjqueryajaxname.php on line 11

    Is mysql_num_rows() deprecated??

    Reply
  6. Redet Getachew 3:43 pm 7/09 of 2013

    change “$(‘input#name’).on(‘click’” to $(‘input#name’).on(‘keyup’

    Reply
  7. Julian Cohen 4:24 pm 7/09 of 2013

    $result = $mysqli->query(“SELECT userid FROM users WHERE userid = ‘”. $db->real_escape_string($userid) . “‘ “);
    if ($result->num_rows) {
    //code
    }

    You can add and manipulate it to work for you

    Reply
  8. Redouane Hammou 5:05 pm 7/09 of 2013

    it’s google chrome press F12 to see the page
    code

    Reply
  9. S. Zhao 5:52 pm 7/09 of 2013

    The tracking is very cool when executed, what’s that? Firefox?

    Reply
  10. John B 6:43 pm 7/09 of 2013

    Is yours not returning what is in the database? That’s the problem I am having too.

    Reply
  11. endpuncture 7:23 pm 7/09 of 2013

    Well, i’m off to kill myself because apparently nothing works even though my code is exactly the same as yours. 

    Reply
  12. A Cat 7:58 pm 7/09 of 2013

    How can I make it so it keeps checking if there is a new value posted in the db it automatically updates on the page

    Reply
  13. amit asthana 8:02 pm 7/09 of 2013

    Hey alex, i want to do the same thing, but i dont want to use the submit type button, i want it should give result as soon as i type in the box, maybe on page or a alert box, i know it can be done…., do you have some tutorial to explain this?

    Reply
  14. SaYNoINC 8:18 pm 7/09 of 2013

    Hi alex, what if the database is being update, how can we update the name.php without being refresh?

    Reply
  15. dashbyictfd 9:14 pm 7/09 of 2013

    Trying to convert Alex’s code to MySQLi, having issues with the last line of code, can anyone suggest how to rewrite it?

    I have

    echo (mysql_num_rows($query) !== 0) ? mysql_result($query, 0, ‘location’) : $name . ‘ is not listed in our database’;
    }

    Reply
  16. vuong nguyen 9:38 pm 7/09 of 2013

    thank Sir

    Reply
  17. Adika Alchemist 10:29 pm 7/09 of 2013

    is it work with table within it?

    Reply
  18. Jeroen Martens 10:42 pm 7/09 of 2013

    I always end up with a youtube video of this dude. I wonder…. Again cool stuff mate. !

    Reply
  19. Karl Pokus 11:30 pm 7/09 of 2013

    I love that you start off your tuts with the result. Should really be a best practise. Kudos!

    Reply
  20. Alex A 11:45 pm 7/09 of 2013

    In my name.php file I want to echo Test surrounded with paragraph tags. However, instead of my webpage display “Test” as a paragraph, it displays “Test” with the actual paragraph tags visible next to it. How can I echo “Test”, but keep some paragraph tags on it?

    Reply
  21. Bayu Ekatama 12:06 am 8/09 of 2013

    **phpacademyorg/course/get-data-from-mysql-database-without-refreshing-page
    couldn’t find that page.

    please send me full of code, cbs.bayu@gmail.com
    thanks before

    Reply
  22. jinixvomitorium 12:47 am 8/09 of 2013

    This is very helpful! also I am wondering how to transfer a $_GET from an index page to the jquery page that passes it to the PHP file that processes the query.

    Reply

Your opinion matters. Add it below.


Tip: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recent comments

Categories



Copyright jqueryui.info since 2010. All rights reserved. Design and the Absolute Theme by Tommie Hansen.