AJAX connection to MySQL PHP API

Laurence Svekis, Web technology Instructor

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

    • 1 Introduction to creating an AJAX database interaction API

    • 2 Resources Setup mySQL PHP ready

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

    • 4 Working with jQuery

    • 5 jQuery Ajax methods

    • 7 AJAX post content to PHP endpoint

    • 8 PHP output as JSON data

    • 9 AJAX send multiple values to PHP endpoint

    • 12 Create MySQL database table

    • 14 Connect to Database

    • 15 Add content to database via AJAX frontend code

    • 16 Insert to mySQL

    • 17 Insert and update Database content with AJAX

    • 18 Get data from Database output as JSON

    • 19 Dyanmically output new JSON data

    • 20 Get data output into HTML

    • 21 Web API conclusion


About This Class

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

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!





Laurence Svekis

Web technology Instructor

Providing Smart digital solutions online since 2001. I am considered a true web technology expert. Having professional experience in a wide range of digital areas. Everything from Search Marketing, Video Marketing, Content creation, User Experience, application architecture, and web programming.

Understanding how users flow through the web and learning what drives users to interact online has been the cornerstone of what I do. The more seamless the process the better the user experience and the more likely they are to interact again and share their experiences.

After launching my first websites I quickly realized that to get traffic on your site you need to be able to market online. Research and using personal experimentation as to what are the most successful ways to effectively drive traffic to my websites, I was able to successfully build multiple success eCommerce sites. I used my expertise to provide Search Engine Marketing Services SEO to 100's of clients.

In the advent of Social Media in 2006, I had identified it as an excellent opportunity to drive traffic and connect with users. I created many successful sites that integrated with Myspace and then later into Facebook. I was able to monitize the traffic on several platforms, driving in some cases 10K+ clicks daily to the various platforms. I continued to perfect the art of Internet marketing and adapt to new technology and changes.

In 2008 I created my first YouTube video, and channel. Realizing that there was another great opportunity with video I have been experimenting with video marketing and video monization. Youtube being the second largest search engine has a very bright future. As technology progresses the trend has always been quicker, easier means of delivering content always wins out. Images beat out text as they are easier and quicker for us to process, videos beat out images being the most efficient means of getting content to users. As bandwidth increases, and more platforms that can even easier deliver videos become available videos will be the trend for the future.

Understanding technology provides a means to better connect with users.

Applications I've created have entertained, informed and engaged tens of millions of people. I have over billions of page views on various platforms, and have sent millions of click through visitors.

I have developed hundreds of web applications, from micro sites to enterprise level platforms.