PHP for Beginners 2020 Part 2: PDO, MySQL, phpMyAdmin
4.7 (197 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,245 students enrolled

PHP for Beginners 2020 Part 2: PDO, MySQL, phpMyAdmin

Every line of code explained. Learn PHP, PDO, MySQL & phpMyAdmin to create data driven websites. Award winning teacher.
4.7 (197 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,245 students enrolled
Created by Patrick Morrow
Last updated 6/2020
English
Current price: $30.99 Original price: $44.99 Discount: 31% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 2.5 hours on-demand video
  • 3 articles
  • 10 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
  • Create database tables
  • Populate a database table manually via phpMyAdmin
  • Populate a database table via a CSV file
  • Populate a database table via a SQL dump
  • Connect to a database using a PHP PDO connection
  • Understand the CRUD acronym
  • Create records in a database table via PHP
  • Read records from a database table via PHP
  • Update records in a database table via PHP
  • Delete records from a database table via PHP
  • Use HTML forms to create, read, update and delete records
  • Use Bootstrap to style forms and tables
Course content
Expand all 30 lectures 02:42:50
+ Introduction
4 lectures 26:29

This is an introduction to the course letting you know what will be covered throughout the course.

Preview 01:20

In this lecture you will learn how to set up CodeAnywhere (if you decide to use it).  You are also free to use your own development environment.

IMPORTANT: Please read carefully

You are free to use any development environment that you are already using (if any). Otherwise, I highly recommend using CodeAnywhere to write your PHP code.

If you have never coded PHP before then you may not be aware that the code needs to be run by the server engine prior to being displayed on your browser as HTML.  You therefore need to set up your server environment correctly. If you do not have experience of setting up a server environment then simply use CodeAnywhere.

Due to the huge number of possible platforms and editors I cannot offer support for third party development environments.  However, I will happily support you if using CodeAnywhere as it is the editor I use throughout this course.

There are many additional benefits of using CodeAnywhere including:

  1. there is a free 7 day trial if you would like to test the environment.  If you do like it then you can get the paid version for only $3 per month.  Otherwise feel free to use any alternative PHP development environment).

  2. it is cloud based so you can use any computer to login 

  3. if you are having any issues with code during the course you can share your code easily with me

  4. if you need additional help with your server then I can log in and help (provided you are willing to allow me)

  5. if you wish to upgrade CodeAnywhere to a professional account later then you can (otherwise just use the free version)

If you experience any issues with setting up your PHP for Beginners coding environment on CodeAnywhere then please let me know via a private message and I will happily help you out.

Preview 08:18

In this lesson we will learn how to access phpMyAdmin

Preview 07:56

In this lesson we continue to idea of getting a quick win by retrieving records from the database and displaying them in the front end.

Preview 08:55
+ The Basics of phpMyAdmin
4 lectures 16:16

We go back to basics with phpMyAdmin and learn how to manually create a database table and populate it from within phpMyAdmin.

We also look at how a CSV export from a spreadsheet can be used to populate the database table.

Preview 08:37

In this task you will need to create a table for the teachers.

Take care when creating the fields and make sure you select the correct field type.

When uploading the CSV file remember which steps you need to take to ensure you do not include the header row.

Preview 00:48

This is the solution for TASK 1.

I think it is important for you to feel confident with this task before you move on to the next lesson.

Preview 02:47

In this lesson I review a few of the options in phpMyAdmin and show you how to update a record.

There are too many options, many of which are quite advanced, to cover in this beginners course.  However, I go through some of the basic features.

We will be coming back to phpMyAdmin throughout the course.

Preview 04:04

This short quiz reviews some of the topics covered in this section of the course.

The Basics of phpMyAdmin
3 questions
+ Basic CRUD
8 lectures 44:50

In this lesson you will learn how to make a connection to the database and use a try catch block.

Making the connection
07:46

In this lesson we use a try catch block to pick up exceptions from the database config file.

Catch me if you can
03:22

In this lesson you will learn how to create a record

How to create a database record
06:43

In this lesson you will learn how to read database records

How to read database records
07:20

In this lesson you will learn how to update database records

How to update database records
05:05

In this lesson you will learn how to delete a record from the database.

How to Delete a record
03:02

This task involves you creating a database and populating it with the books.csv data. Please see the resources area to download the books.csv file.

A full video solution is provided in the next lecture.

Good luck!

TASK 2: The Book Store
03:24

This is the solution to the book store task

TASK 2: The Book Store - SOLUTION
08:08
+ Using HTML with PHP
12 lectures 01:15:07

In this lesson we start to integrate html with php. 

We use Emmet to simplify the process of writing html code (see: https://docs.emmet.io/)

From the initial book list which looked quite ugly and difficult to read, we transform it into a little beauty!

Oh so pretty, Emmet!
12:04

This is just a pre-lecture note about the update to the fontawesome.com website.

FontAwesome.com Update
00:43

In this lesson we consider what the client of the book store would need in terms of being able to edit the records.  We therefore add a little edit icon using Font Awesome.  

When we click on the edit icon we will need to send a query string to an edit file so that the record can be edited.

Adding the edit icon
05:33

In this lesson we create the edit page and add the URL to the edit icon so that when the client clicks on an edit icon the id of the book is sent as a query string on the end of the url to the edit page.

We then pick up that query string and get the id and echo it to the screen to show that everything is working.

Sending the record id to the edit page
03:31

In this lesson we will populate the edit page with a database record.

Populating the edit page with a database record
10:18

In this lesson we look a little bit deeper at how we can fetch results from the database.

We consider the array content and what we really need to be able to view the record fields.

Fetch...good dog!
04:59

In this lesson we will use filter_var to provide some error trapping and validation of inputs.

A little bit of error trapping
06:28

In this lesson you will learn how to update a record via the HTML form

Updating a record via the HTML form
12:15

In this task you need to create a delete script to delete a record from the database

TASK 3: Deleting a Record
01:15

This is the solution to Task 3. You will learn how to delete a record from the database.

TASK 3: Deleting a Record - SOLUTION
10:14

In this task you will need to create the form and script to INSERT a record into the database.

TASK 4: Creating the form and script to INSERT a record
01:12

This is the solution to Task 4. I show you how to create a form that will allow the user to enter record details which are then sent to the database.

TASK 4: Creating the form and script to INSERT a record - SOLUTION
06:35
+ Bonus
2 lectures 00:08

Bonus lecture for the course advising that you can join the PHP for Beginner course.

Bonus Lecture
00:04

This is the complete code for the course in one single downloadable zip file

Complete Code for Download in Zip file
00:03
Requirements
  • Have some knowledge of HTML and PHP
  • Internet access
  • A functioning PHP, MySQL and phpMyAdmin development environment of your choice. I will show you how to use CodeAnywhere including all set up. There is a free 7 day trial for those who would like to test it. Then is it only $3 per month. It is the best and easiest system I have found to enable me to support students.
Description

Welcome to PHP, PDO and MySQL for Beginners!

This course is intended for those who wish to develop their understanding and skills in PHP and MySQL in order to develop data driven websites.

Every line of code is explained as I teach. The lessons are kept short and to the point.


STUDENT REVIEW: "Patrick is an excellent, thorough and easy to understand teacher. I bought this course as soon as it was available because I was so impressed with his first course. Thank you Patrick!"  5 STARS

STUDENT REVIEW: "I learned a lot in this "close to real live" education. It was very helpful to get into connection with some important things close to PHP. By taking a look at bootstrap, emmet, SQL and little bit of CSS and other things was very helpful to get an overview of the most important tools and languages around PHP. I really love to listen to and learn from Patrick. He is giving very good and easy to understand comprehensive explanations, he is setting tasks that are a challenge but feasible and he is showing the solutions. By listening to all that and writing the code myself in the tasks I really learned a lot. Great Stuff !"  5 STARS

STUDENT REVIEW: "An amazing course. Very good for beginners."  5 STARS


The unique difference about my courses is that you are given exercises to complete after each section.  This enables you to try what you have learnt with my full support.  Students who have taken this course appreciate the level of clear explanation and strengthening of their skills.

The course has been developed following years of teaching students in a real classroom environment and watching and analysing their reactions to new concepts.  Therefore, each lesson has been designed to quickly help you understand the processes involved in connecting to and actively using databases within websites.

At the end of the course you will be able to:

  • create a database using phpMyAdmin

  • use a SQL dump to create a MySQL database table and populate it

  • use a CSV file to populate a MySQL database table

  • change database user permissions using phpMyAdmin

  • connect to a MySQL database using a PDO connection

  • understand the acronym CRUD

  • create, read, update and delete records using phpMyAdmin

  • create, read, update and delete records using PHP

  • create an input form using HTML

  • create, read, update and delete records by using a HTML form and PHP

  • use Bootstrap to style the input form

  • use Font Awesome to add some icons for edit and delete actions

  • present database table records in a table and style it using Bootstrap

IMPORTANT: Please read carefully

You are free to use ANY suitable development environment including the one that you are already using (if any and if suitable). Otherwise, I highly recommend using CodeAnywhere OR Visual Studio Code with MAMP to write your PHP code.  However, please note that CodeAnywhere is a PAID option whereas Visual Studio Code and MAMP are FREE.  Again, please note that using either is OPTIONAL.

If you have never coded PHP before then you may not be aware that the code needs to be run by the server engine prior to being displayed on your browser as HTML.  You therefore need to set up your server environment correctly. If you do not have experience of setting up a server environment then simply use CodeAnywhere.  I realise that for some students this may seem like a daunting process and therefore I am offering an 'onboarding' conference call if you would like 1-1 support.  For 99% of users this is not required but I think that having the security of knowing that someone is there to support you is important.

ZOOM or Webex Meeting: I am more than happy to arrange a time where I can help you set up CodeAnywhere and/or Visual Studio Code if you feel you need the additional support.  Having the 1-1 support is useful in getting you up and running quickly if you are new to coding.  Just send me a private message.

Due to the huge number of possible platforms and editors I cannot offer support for third party development environments.  However, I will happily support you if using CodeAnywhere as it is the editor I use throughout this course.

There are many additional benefits of using CodeAnywhere including:

  1. there is a free 7 day trial if you would like to test the environment.  If you do like it then you can get the paid version for only $3 per month (or $1.50 with 50% off voucher code).  Otherwise feel free to use any alternative PHP development environment.

  2. it is cloud based so you can use any computer to login 

  3. if you are having any issues with code during the course you can share your code easily with me

  4. if you need additional help with your server then I can log in and help (provided you are willing to allow me)

  5. if you wish to upgrade CodeAnywhere to a professional account later then you can (otherwise just use the free version)

If you experience any issues with setting up your PHP for Beginners coding environment on CodeAnywhere then please let me know via a private message and I will happily help you out.


MY PROMISES TO YOU

As a registered teacher (yes, I teach in a real classroom every day) I strongly believe it is my job to ensure you feel totally supported when taking my classes. I therefore promise the following:

  • to respect you as a student and individual with your own learning needs

  • to be courteous and polite in our interactions

  • to answer your questions promptly

  • to fix any issues you may encounter with the lessons

  • to respond promptly to feedback

I really do look forward to welcoming you to this course. I am confident you will enjoy the approach of learning what each line of code actually means.

Join the course today.


Who this course is for:
  • Absolute beginners to using MySQL with PHP or those wishing to refresh their basic skills.
  • This is NOT a course for advanced users.