AJAX connection to MySQL PHP API

Laurence Svekis, Web technology Instructor

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
18 Lessons (1h 49m)
    • 1. Apimysql

    • 2. 1 Introduction to creating an AJAX database interaction API

    • 3. 2 Resources Setup mySQL PHP ready

    • 4. 3 Quick jQuery intro and how to add it to your web pages

    • 5. 4 Working with jQuery

    • 6. 5 jQuery Ajax methods

    • 7. 7 AJAX post content to PHP endpoint

    • 8. 8 PHP output as JSON data

    • 9. 9 AJAX send multiple values to PHP endpoint

    • 10. 12 Create MySQL database table

    • 11. 14 Connect to Database

    • 12. 15 Add content to database via AJAX frontend code

    • 13. 16 Insert to mySQL

    • 14. 17 Insert and update Database content with AJAX

    • 15. 18 Get data from Database output as JSON

    • 16. 19 Dyanmically output new JSON data

    • 17. 20 Get data output into HTML

    • 18. 21 Web API conclusion

How students rated this class
Leave Review

Watch more to review

We ask our students to watch a few lessons before reviewing to make sure we get quality feedback!

Best Suited for
 --  Beginner Intermediate Advanced Beginner/Intermediate Intermediate/Advanced All Levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

Be the first!

No ratings just yet—watch a few lessons to be the first to share whether this class met your expectations.

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Be the first to leave a review in our updated system!
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update. You are welcome to edit your old review into the new system!

2 of 2 students recommend this class
Found this to be a good introduction for learning some powerful functionality. On lessons 17 & 18, there’s a few times the code shown won’t work. Such as get_results() instead of get_result(), and num_row instead of num_rows. If you’re a relatively new to PHP/MySQL, this can stump you for a while while you try to debug your code as you follow along. Turns out, if you use what he showed you, it won’t work. (And it can’t have worked for him either.) Later on in the next step you’ll see that he has corrected the code in the background so that his works, but he doesn’t show himself making the corrections or mention that he had typos. He’ll go from faulty source code to a working example, so it can stump you for a bit. Also I personally didn’t realize that in SQL you can’t use ‘ instead of ` - spent a while trying to figure out why it wasn’t working for me until I noticed that I had used apostrophes instead of back ticks on one of my SQL queries. Hope this helps!