PHP CRUD Tutorial with MySQL & Bootstrap 4 (Create, Read, Update, Delete)

In this PHP CRUD Tutorial we’re going to create a fully functional PHP CRUD application with Bootstrap and MySQL. PHP CRUD stands for Create, Read, Update, Delete which is an easy way to memorize all the components needed for a fully dynamic web site application. We’re going to be using MySQL statements called INSERT, SELECT, UPDATE, and DELETE which correspond to CRUD functionality.

Hey guys, I’m now using Patreon to share improved and updated video content and source files. For a small fee you can access all the downloadable files from this lesson (source code, icons & graphics, cheat sheets, OneNote notes) and everything else included in the video from the Patreon page. Additionally, you will get access to ALL Clever Techie videos in HD format with no ads. Thank you so much for supporting Clever Techie 🙂

Download this video’s files here:

( You also get access to ALL source code and any downloadable content of ALL Clever Techie videos, as well as access to ALL videos in HD 1080p quality format with all video ads removed! )


( Website ) – PHP, JavaScript, WordPress, CSS, and HTML tutorials in video and text format with cool looking graphics and diagrams.

( YouTube Channel )

( Google Plus ) – clever techie video tutorials.

( Facebook )

( Twitter )



Leemel Arben David says:

This is a very good tutorial! Thank you Clever Techie!

If you ever encounter that your Delete Message Alert is not display…

Put a die() function right after the header(‘location: index.php’);

It will look like this:
if (isset($_GET[‘delete’])){
$id = $_GET[‘delete’];
$mysqli->query(“DELETE FROM data WHERE id = $id”) or die( $mysqli->error());
$_SESSION[‘message’] = “Record has been deleted!”;
$_SESSION[‘msg_type’] = “danger”;

header(‘location: index.php’);

Carlo Molina says:

Warning: count(): Parameter must be an array or an object that implements Countable

I keep on getting error like this when i try to display data from the table with the button edit, any fix for this? Thank you so much for a great tutorial.

Amit Chauhan says:

This is the best CRUD Tutorial I have ever studied. Thanks a lot Sir.

Ehirim Uchenna says:

Hi Clever Techie, please can you make and publish a video on “Building Database Web Application”. Using OOP, PDO, and Ajax.

Youtube L says:

Very good tuts.
Great effort

mong kah fu says:

Thank you sir. You helped me out.

Mixalhs Giannopoulos says:

Can this CRUD example be applied to Microsoft SQL server too? Great video!

tovid toovid says: ,?

Amir Ali Anwar says:

sir you are great ,Respect from pakistan

Tri Apriansyah says:



Can I ask your PHP CRUD notebook according to this video? Include outline, bootstrap class name, and other..

Brent Meeusen says:

CRUD is also known as CMS (Control Management System) I believe

megahard technologies says:

if i put sql code then it wont even open. only echo staements like are running. if i put mysqli statement anywhere then even index.php will not open nor it gives error. i dont know how to solve this. im using xampp

Jefelyn Viernes says:

Sir how can I fix this :

if (isset($_GET[‘edit’])) {
$id = $_GET[‘edit’];
$update = true;
$result = $mysqli->query(“SELECT * FROM data WHERE id=$id”) or die($mysqli->error());

if (count($result)==1) (error)
$row = $result->fetch_array();
$name = $row[‘name’];
$location = $row[‘location’];

thank you

C Dorma says:

How do you write an algorithm for MySQL table data.

Mohamed says:

could you help look over my code. I have trouble seeing all of my sql data from the loop!

Pherez Sigu says:

Hi Clever tech, i managed to follow through this tuitorial, thanks alot. one this that does not work out well is the update , im able to save but update is throwing an erro of undefined variable, i declair it on th e process.php but still update cannot seem to work wjats the fix ?

club Likevideo says:

download template wordpress, html css, drupal, magento free in

Ankit Mandloi says:

Great….Made it simple Thanks

TheLewisOSF says:

I followed this tutorial, but I can’t get the Update part to work, when I click the Update button, it routes to my “process.php” page, to a blank screen. I don’t really understand why. My code for this has been copied completely, please help?

Philips Future says:

Great content

C O says:

Thanks a lot, great piece.

A.M.T. Sangeeth says:

Nice lesson!!!

Mr.Chanty Sad says:

well done thanks teacher

Steve Carter says:

Great tutorial, thank you for all your super-helpful videos! I am following along step-by-step and have encountered an issue at the ‘Edit’ user section.

You put your ‘SELECT * FROM data WHERE id = $_GET[‘edit’]’ query and variable-setting logic in the process.php file as if it was supposed to be called when the Edit button is clicked. But, the Edit button’s href target is itself, the index.php page. How is the code in process.php to retrieve the selected user’s record being invoked and how are the updated $name and $location variables getting passed back to index.php?

I had to put the query and variable-setting logic in the index.php file above the add/edit form

to get it to work.

I thought I was getting this really well but am really confused now – I don’t understand how your code works since:
1) you aren’t calling the process.php file when you click an ‘Edit’ button,
2) nor are you passing any SESSION or GET variables back to index.php from the Edit code in process.php even if you got there somehow.

I’m sure I’m missing something obvious but I am stumped right now.


Jeova Davila says:


Emerson Bertolo says:

Thank a lot man for this amazingly easy to learn tutorial!

Amirul Yusoff says:

where did u get the bootsrap link?

dandu suresh says:

it is really awesome tutorial, clear cut and u r the master…really appreciate your work.

ValerieDianhey says:

This helped me out so much!! I was wondering how this could be used if there were multiple tables in the database and not just the data table

Second Wind says:

realy good tutorial simple and to the point, minor criticism could have been useful with a little more explenation 8/10

Shalaw Fatah says:

This is by far the most successful tutorial I’ve watched on PHP, MYSQL. I’d love to see a video on search function in the database, and pagination. Also, it would be good if you could depend on CSS3 instead of Bootstrap. I really appreciate the work. Thanks.

Juan Carlos Ajahuana says:

Nice crud, thanks

Christian Fall says:

so that $row variable is not a part of mysqli methods or other

Ana Margarita Morales Oliú says:

Thanks very much for sharing this video! Greetings

Dexter Famoso says:

thank bro!!

Sam Zone says:

Great Content Techie…
People will really appreciate your work…

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!