Home Game 16: Connect To A Database Using OOP PHP | PDO Tutorial |...

16: Connect To A Database Using OOP PHP | PDO Tutorial | Object Oriented PHP Tutorial | PHP Tutorial

In this OOP PHP tutorial, I will show you how to connect to a database using OOP PHP. In the next few episodes we will focus on how to interact with databases using PDO

PDO vs MySQLi:
Auto load classes:


With over 20 years experience, Andrew is creating web & front-end design tutorial videos!


First of all, thank you for all the support you have given me!

I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!

I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach.

I hope you will find it helpful 🙂

Material for this lesson:

Nguồn: xemhai.org

Xem thêm bài viết khác: https://xemhai.org/game/


  1. why you didn't use the $this->dns and $this->pdo inside the method, are they different inside method and outside method. I mean when we define inside class i.e outside method they are properties and inside method they are know as variable or what?

  2. I really enjoy your tutorials. You present useful information in a clear, easy to understand manner. i'm a proyd supporter of mmtuts.

  3. Fatal error: Uncaught Error: Call to protected method connection::connector() from context '' in C:xampphtdocssos.php:5 Stack trace: #0 {main} thrown in C:xampphtdocssos.php on line 5

  4. East & West…..Danish Brain is the BEST in programming….Cause….They understand the problems CLEARLY….They go through the steps DEEPLY…..They explain the complex staffs EASILY…..and mmtuts is just Life Saving Awesome….More time I spend with you….More get addicted to know from you….Thanks….& All The Best…Thumbs Up..!!

  5. You're missing out to wrap this up in a try catch. Also, it should be recommended to keep credentials inside a config file – even if you don't work with git/bigger teams, just for habbit reasons.

  6. @mmtuts We are currently missing import / update / select oop pdo tutorials, along with login system with oop pdo

    Please when you have time create them.

  7. Are you planning to create a tutorial building a MVC-based example?

    Thanks for this very nice tutorials!!

  8. Hi, I just want to thank you for the amazing tutorials of PHP, I learned so much from them, can you please make a video about the testing methods of a web application built with PHP, A lot of people complete the projects and don't have an idea how to test the web application properly and I'm one of them, thanks

  9. 😠😠😠😡😡😡You should upload video in 2 days. You are taking too much time. We can wait whole week or more for next video.

  10. Daniel was one of my first teachers in PHP, and learning some of the basic techniques was pretty easy to understand because of how he deliver the technicalities of some SPL.

  11. Thank you so much! Can't wait for the next OOP PHP tutorial on how to insert and gather information from the database. Keep up the good work!

  12. Really!! Really Thanks Very much for making tutorial on this topic I hope you will make full tutorial on this topic and finish it soon….so that you'll make on others😊✌️😀 Topics!!!!…….

  13. Sir Can you can make a video on crud application using oop Insert update delete show data please..

  14. Thanks for the tutorial! Great and very helpful as usual. Daniel, please make a tutorial how to make a dynamic php site. Should we use the ordinary <?php include '…..';?> and GET_page from the SQL database (for example news), or should go to the hardest way of mvc? There are almost no tutorials on youtube how to create a dynamic php website getting its pages from an SQL database.

  15. Hey Daniel you should get python tutorial up and running on this channel. Because your videos content are very very good ❤️


Please enter your comment!
Please enter your name here

Must Read

Hài Nhật Cường

Tên thật: Nhật Cường Sinh nhật: 1965 | Giới tính: Nam Nhật Cường quê ở Nha Trang, sinh ra trong gia đình không ai theo nghệ...

Best of Epic Music 2012 | 1-Hour Full Cinematic | Epic Hits | Epic Music VN

Best of Epic Music 2012 1-hour full cinematic - The best epic music collection of all times. Full HD version available at Request standalone...

Tiết lộ cách tải nhạc TikTok làm Nhạc Chuông chỉ DÂN CHƠI mới biết | Truesmart

Link web chuyển nhạc: 🌟 Subscribe True Smart để xem ngay video mới nhất: TRUE SMART Hệ Thống Sửa Chữa Điện Thoại Uy Tín Tại...

nhà đẹp ll mãu nhà 2 tầng 7m x 12m ll Thăm quan mẫu nhà 2tầng II Viila

Đời Sống Việt là kênh chuyên giới thiệu các mẫu nhà đẹp và mới cũng như tất cả các vấn đề về ...


If you are a strategy game lover then you cant forgive yourself to not knowing that there are 4 broad category of startegy games...