Multiple Dropdown Lists Using jQuery, Ajax, MySQL and PHP
4.7 (13 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.
112 students enrolled

Multiple Dropdown Lists Using jQuery, Ajax, MySQL and PHP

This is a short course designed to introduce you to how to use the jQuery AJAX method to populate a dropdown list.
4.7 (13 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.
112 students enrolled
Created by Patrick Morrow
Last updated 4/2020
English
Current price: $13.99 Original price: $19.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 44 mins on-demand video
  • 2 articles
  • 4 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
  • You will be able to use jQuery AJAX calls to the server in order to update a HTML page
  • Create database tables and populate using CSV files
  • Use Emmet to quickly write HTML code
  • Connect to a MySQL database using a PDO connection
  • Read data from a database table
Course content
Expand all 15 lectures 44:29
+ Introduction
1 lecture 03:26

In this lesson we will look at one possible PHP development environment using Visual Studio Code. You are free to use whichever development environment you wish.

Preview 03:26
+ The Database
2 lectures 07:16

In this lesson you will create the database tables for the countries and states.

Preview 04:04

In this lesson you will populate the database tables with the CSV files. The CSV files are attached to this lesson for your reference.

Preview 03:12
+ The Frontend
6 lectures 22:33

In this lesson you will start to create the index page.

Preview 02:14

In this lesson you will see how Emmet can be used to quickly produce HTML code.

Preview 06:00

This is a short lesson where you will use CSS to hide the State dropdown by default

Hiding the State dropdown
01:00

In this lesson you will populate the counties dropdown by using the data from the database.

Populating the countries dropdown
04:24

In this lesson you will learn how to pick up the country ID that has been passed from the country dropdown.

Picking up the ID of the selected country
03:07

In this lesson you will learn how to post data using the jQuery AJAX method.

Posting data using the jQuery AJAX method
05:48
+ The Backend
3 lectures 07:31

In this lesson you will test to see if the data being passed by the jQuery AJAX method can be read by the PHP script.

Testing the jQuery AJAX data
01:45

In this lesson you will produce the PHP code to read the States from the database.

Reading the States from the Database
03:34

In this lesson you will populate the States dropdown.

Populating the States dropdown
02:12
+ The next steps
3 lectures 03:43

In this lesson I briefly discuss the security implications and show you a couple of little tests you can perform on the data.

Security considerations
03:35
Code used in the course
00:03
Bonus Lecture
00:04
Requirements
  • You should be familiar with HTML, CSS, PHP, and MySQL
  • You will need a PHP code editor and access to a MySQL database. I use Visual Studio Code and MAMP in the course. Any equivalent for your computer setup should be OK. Feel free to ask if unsure.
Description

This is a short course designed to get you started using the jQuery AJAX method to post data to a PHP script and work with the retrieved database records. It is a follow along style course, not one to teach you every aspect of PHP, jQuery or MySQL...there are other courses for that. This course is quite specific in its focus.

In the course you will learn how to create the database tables and populate with CSV files before learning how to use the jQuery AJAX method to post data to a PHP script to retrieve database records and populate a dropdown list. This is commonly seen when completing HTML forms and you have to select the country and the state will auto-populate from the selection.


Who this course is for:
  • Beginners to PHP, MySQL and jQuery who want to extend their understanding through a simple practical application. You should already have a fairly good grasp of PHP, HTML, MySQL or be confident enough to follow the lessons easily.