Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

How to Connect a Form to a Database in PHP - PDO Tutorial

Dave Gray via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This beginner tutorial shows how to connect PHP forms to a MySQL database with PDO and implement create, read, update, and delete operations. It imports the World sample database, filters submitted input, and tests the application in the browser.

Syllabus

Intro
A Note About Setup
Importing the World database
Creating the PDO Connection file
Creating the index page forms
Filtering Submitted Form Input
Building and Executing a SQL Select Query in PHP
Building and Executing a SQL Insert Query in PHP
Review the Logical Flow of the Application
Working with the results of the SQL Select Query
Creating the Update and Delete Forms
Reviewing the Logical Flow of the Application again
Creating the delete_record.php file
Creating the update_record.php file
A note about PHP files
Adding a confirmation to the index file
Reviewing the application in the browser
Testing and Debugging!
Adding CSS Styles
Discovering one more issue...and fixing it!
Finishing the CSS styling

Taught by

Dave Gray

Reviews

Start your review of How to Connect a Form to a Database in PHP - PDO Tutorial

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.