Summary and Perspectives

This lesson summarizes everything that we have covered in this course.

We'll cover the following

We’ve learned a lot throughout this course. Here are some key takeaways:

  • To connect to the database in PHP, use the PDO extension like this: $connection = new PDO($dsn, $username, $password, $options);
  • To run a query, we either use the PDO::query method if no variable is going to be used in the query or the prepare() and execute() functions if at least one variable is going to be used.
  • It doesn’t really matter if we’re running our query with the SELECT, INSERT, UPDATE, or DELETE statement.
  • MVC is an architectural pattern that is used to break up code into three logical components: model, view, and controller.
  • We should never trust user-submitted data. We should always check for validation, both on the client-side and the server-side.
  • Routing consists of mapping an HTTP request to a request handler, which can either be a function or a method.

Next step

We are grateful to you for learning with us. This course was only a small step towards the more advanced topics in PHP. There are still many things you may need to learn to feel more comfortable working with PHP.

But remember, grasping the concepts of programming takes time and practice. As they say, Rome wasn’t built in a day. Every professional developer that you know, or meet will have taken the same path.

Keep on practicing

We all know that practice makes perfect. So, if you want to become more confident as a PHP developer, practice your craft on a regular basis. In particular, we urge you to start building a personal project right now. This is the best way to stay focused and create something meaningful while having fun along the way. You may already have a project idea in the back of your mind. If not, here are a few ideas:

  • A medicine dose tracker web application, like the one described here.
  • A CMS, like WordPress. Get inspiration here.
  • Other PHP projects in this Github repository.

Get hands-on with 1200+ tech skills courses.