AJAX connection to MySQL PHP API
4.2 (71 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,313 students enrolled

AJAX connection to MySQL PHP API

Learn how you can create a simple database API which can be accessed from frontend code, updated and more
4.2 (71 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,313 students enrolled
Created by Laurence Svekis
Last updated 11/2019
English [Auto]
Current price: $12.99 Original price: $19.99 Discount: 35% off
8 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 2.5 hours on-demand video
  • 9 articles
  • 2 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Create a database connection using PHP
  • Use JSON objects within JavaScript
  • INSERT, UPDATE and GET content from a database into javascript
Course content
Expand all 32 lectures 02:27:44
+ Quick Intro to jQuery
4 lectures 19:18
Quick jQuery intro and how to add it to your web pages
Working with jQuery
jQuery Ajax methods
AJAX jQuery Source Code
+ Create PHP endpoint
5 lectures 18:14
AJAX post content to PHP endpoint
PHP output as JSON data
AJAX send multiple values to PHP endpoint
Source Code PHP AJAX index
Source Code api
+ Adding MySQL database
13 lectures 01:00:19
Create MySQL database table
Create table mysql
Connect to Database
Add content to database via AJAX frontend code
Insert to mySQL
Insert and update Database content with AJAX
Get data from Database output as JSON
Dynamically output new JSON data
Get data output into HTML
Web API conclusion
Index Source Code
API.php source code
Course Resources
+ Code Snippets
7 lectures 38:20
Setup HTML form structure
AJAX setup form data serialize
Respond with JSON data from server
PHP setup response to AJAX
Frontend messaging to user AJAX
Application Tweak and bug fix
Form validations JSON response Source Code
  • HTML and JavaScript basics
  • Frontend web development concepts
  • API general understanding of what it is

The scope of the course stays focused to building the API interaction.  It covers multiple technologies working together, and topics only in relation to the finished project.

Want to access your MySQL database using JavaScript?  Let web visitors interact seamlessly with you MySQL database.  Add new content, update existing content, and query the database to return results! Databases provide so much power to your web applications, why not use them more.

This unique course takes you through the steps of creating a simple web api to allow web visitors database interaction.  Database is key to creating an amazing interactive dynamic experience for web users.  It lets you do more!

This course will open the door for you to build our a lot of COOL STUFF!  From the lessons of the course, you will be able to produce a wide range of uses for the code. Source code is included so you can practice along side the lessons, try it out for yourself and tweak it for your individual needs.

This course covers a lot of technologies and demonstrates them all working together to achieve the API objective.  

JavaScript and an understanding of the Document Object Model is an important foundation before starting this course.  We've designed the course to be fast paced step by step covering the essentials to build the web API.  Please note that the course overviews core technology used only within the course to build the API.  

What you will learn

  • Basic HTML - setting up simple elements to access from JavaScript
  • Basic CSS - creating buttons
  • jQuery - AJAX, Getting element values from a form, updating element inner HTML.
  • JSON - How to send JSON objects and how to retrieve JSON data and use it as objects within JavaScript.
  • PHP - How to get request variables, setup a mySQL database connection, looping of data, arrays, outputting content as JSON formatted.
  • RegEx - Check values as numeric
  • MySQL - Setup a database, connect to a database, phpmyadmin access, write queries to Update, select and insert data.   Prevent SQL injection.
  • See it all working together and much more!

By the end of the course you will have the knowledge on how to put it all together and create a simple API to interact with your database.  Use this course as a starting point to limitless options with this fully functional and customizable code.

I'm here to help you learn about APIs and ready to answer any questions you may have.  What are you waiting for enrol now and see what you can do!

Who this course is for:
  • web developers
  • anyone looking to connect frontend code to a database
  • web designers
  • JavaScript developers and jQuery Developers