
Master object oriented programming in PHP, work with databases using PDO, and write secure, scalable code. Learn about classes, inheritance, interfaces, traits, namespaces, and how prepared statements prevent SQL injection.
Learn how to consume this PHP for Beginners course by watching the introduction and installation, then freely navigate three modules—oobe, working with databases, and writing secure code.
Skip the next two videos if you've already downloaded VS Code and exam, and start the course right away.
Install XAMPP to run a local server stack with Apache, MySQL, PHP, and phpMyAdmin for back-end development; learn to download, install, configure components, and test locally via localhost.
Install Visual Studio Code on Windows by downloading and accepting the license, then open the editor to start coding with me. Other editors like PhpStorm or Notepad++ work too.
Master the fundamentals of PHP object-oriented programming, including classes and objects. Explore encapsulation, inheritance, polymorphism, and interfaces for testable, extensible, reusable code ready for frameworks like Laravel, Symfony, and Codeigniter.
Explore object-oriented programming in PHP by defining classes and objects, and apply core concepts like encapsulation, abstraction, inheritance, and polymorphism to build organized, scalable code.
Learn how classes serve as blueprints, how objects are instantiated with the new keyword, and conventions like upper camel case and one class per file, via a DB example.
Explore PHP properties and methods, learn how public, private, and protected access modifiers shape data in a class, create objects, access properties, and call methods with parameters.
Master the $this keyword in PHP, which references the current object to access properties and methods inside a class using the object operator to print name and password.
Learn how the private keyword in PHP restricts property access to within a class. Use getters and setters to expose private data with custom logic and a security layer.
Learn about PHP magic methods, focusing on constructors and destructors that run automatically. Constructors initialize properties and accept parameters; destructors clean up resources when objects are destroyed.
Learn encapsulation in PHP: bundling data and methods into a class, restricting direct access, and using getters and setters to protect internal state.
Explore inheritance in PHP: learn how a child class extends a parent to reuse and override methods, boosting reusability and extensibility in object-oriented code.
Explore how constructors work in inheritance, including automatic parent constructor calls, overriding in child classes, and using parent::__construct to preserve initialization with animal and dog examples.
Learn how to override parent class methods in PHP and extend behavior in the child class by calling parent methods, and prevent overriding with the final keyword.
Learn how protected properties and methods govern access in PHP inheritance, with examples using age and a protected can hunt method to show public, protected, and private visibility.
Explore polymorphism by using an abstract class as a parent and implementing its abstract methods in subclasses. Enforce a contract so different classes share an interface and act differently.
Explore polymorphism with interfaces in PHP by defining contracts as public method declarations, enforcing implementations, and illustrating use of multiple interfaces with a dog and cat example.
Explore polymorphism with multiple interfaces in PHP by implementing several interfaces, using type-hinted functions to trigger makesound and run methods across dog and cat examples.
Explore static properties and methods in PHP, access them without objects via the class and scope resolution operator, and use self with static methods for global state and Laravel helpers.
Define class constants with the const keyword, access them via the class name and scope resolution operator, and use their immutable, publicly visible values that can be inherited and overridden.
Explore PHP abstraction by defining abstract classes and methods to enforce contracts, hide complexity, and promote reusable, flexible code across related classes.
Learn how PHP traits enable code reuse in a single inheritance language, create traits with properties and methods, and apply them to models for logging and helpers.
Explore how PHP namespaces organize related code and prevent naming collisions, using an example with Apple and LG namespaces and use statements to alias and access classes.
Discover how PHP Data Objects (PDO) unifies database access via a cross-db API, explains DSN connections, and provides secure, reusable prepared statements across multiple databases.
install sublime by downloading it from the website and running the installer; locate sublime text three in program files and use the view sidebar to access open files.
Learn to connect to a database in PHP using PDO, configuring host, database name, user, and password, selecting the MySQL driver, and testing the connection with a conditional.
Learn to implement try catch blocks in PHP to catch errors, set error attributes and error mode, throw exceptions, and display friendly messages with getMessage for database operations.
Explore querying a database with PHP using the query method, retrieving titles from the posts table via a select statement, and iterating results with a while loop.
Learn how to retrieve data from a database in PHP using a query and the foreach loop instead of fetch, including aliasing rows and printing results.
Explore how to fetch data in PHP using various modes—associative arrays, indexed arrays, objects, and lazy fetch—then access properties or keys and decide the common uses.
Learn how to use fetch column in PHP to retrieve a single value from the posts table, with the default index returning first row, and how to adjust the index.
Learn to use fetch all in PHP to retrieve all query rows, choosing associative arrays, index arrays, or objects, then access fields like title and body.
Learn how prepared statements sanitize user input and prevent SQL injections in PHP by preparing, binding, and executing insert queries with title and body fields, using the positional operator.
Learn to update and delete records in PHP using prepared statements, including setting dummy data, binding title and id, executing the statements, and confirming changes in a posts table.
Learn how the row count method detects the number of rows returned by an SQL query and how to act on those results, including a no posts yet message.
Learn how to retrieve the last inserted ID after an insert using prepared statements in PHP and use it for subsequent operations with a focus on example-driven practice.
Explore database transactions in PHP, learning how to begin a transaction, perform multiple queries, and use commit and rollback with try-catch, exception handling, and error mode to ensure atomicity.
Learn how to close a PHP connection by assigning the DNS or connection variable to null, and understand how terminating the connection affects subsequent queries and scripts.
Discover how the like keyword filters data by pattern in PHP using PDO. Write queries with where email like and wildcards such as % and _ to fetch matching rows.
Master using the like keyword in sql queries with prepared statements and where clauses to filter data by patterns, using wildcards like % and _ in php pdo.
Master secure PHP development by preventing SQL injection, CSRF, and file upload attacks through input validation, password hashing, and safe session management; configure production settings and secure file uploads.
Validate and sanitize all user input in PHP and enforce HTTPS. Disable detailed production errors, update to latest versions, use frameworks with password hashing, and follow exploits and experts.
Explore the cross-site scripting vulnerability and how attackers inject scripts through user inputs, then learn to mitigate it by escaping output with htmlspecialchars on GET data.
Learn how remote file inclusion occurs in PHP when user input specifies a file, and prevent it with input validation, a whitelist of allowed files, or disabling allow_url_include.
Explore remote file inclusion by testing a full link while highlighting that the current code remains vulnerable and allow_url_fopen is off on the server.
Hashing passwords protects user data by replacing plain-text storage with PHP password_hash and password_verify. Avoid md5 or sha1; rely on password_hash with salts for secure login verification.
Learn how to hide PHP error messages in production while logging them for later debugging. Use ini_set options like display_errors and display_startup_errors and configure error_log to log to a file.
Disables directory listings by applying an htaccess rule (Options -Indexes) to protect folders like uploads and return a 403 forbidden error.
Learn how to correctly redirect in PHP using header and exit, preventing script execution after a redirect and avoiding data leaks.
Learn why HTTPS encrypts web traffic with SSL/TLS, secures login forms, protects cookies and sessions, and why certificates are essential for secure PHP web apps.
Learn to protect sensitive directories in PHP apps using a directory firewall in cPanel, blocking access to config, vendor, and includes while supporting client access with password-protected logins.
Protect directories with htaccess by denying access to all and allowing from a specific IP on an Apache server, demonstrating the allow from and deny from rules.
Learn to prevent execution of specific files in a project by using an htaccess file to block PHP extensions in upload directories, returning a 403 forbidden error.
Learn to secure file uploads in PHP by restricting allowed file types and validating mime types, preventing malicious scripts and denial of service while handling profile pictures and other inputs.
Learn to secure file uploads by enforcing a two megabyte size limit, renaming files to a unique name in the uploads directory, moving the uploaded file safely, and preventing overwrites.
Fixing log errors preserves security by closing vulnerabilities and preventing sensitive data leaks, while keeping log files clean to protect performance and user experience.
Understand why back end validation matters in PHP, and how server-side checks ensure data integrity, security against SQL injection, and consistent handling across apps.
Prevent session fixation by regenerating the session ID after login and enforcing HTTPS to protect session IDs from network sniffing.
Explains SQL injection vulnerabilities in login forms and demonstrates how to prevent them with prepared statements and bound parameters in PHP using PDO.
Understand cross-site request forgery. Prevent them by generating a cryptographically secure token with random_bytes and bin2hex, storing it in a session, and embedding it in a hidden form.
Are you ready to take your PHP skills to the next level?
This PHP Intermediate Crash Course is designed for students who already understand the basics of PHP and are eager to dive deeper into real-world, professional-level development. In this course, we’ll focus on the three pillars every PHP developer must master: Object-Oriented Programming (OOP), Database Management with PDO, and Secure Coding Practices.
Instead of overwhelming you with theory, this crash course is hands-on, practical, and straight to the point. You’ll learn how to write cleaner, more reusable code using OOP principles like classes, inheritance, interfaces, and traits. These skills will give you the foundation to build scalable and maintainable applications, whether you’re working on a small project or a large web platform.
Next, we’ll dive into databases using PDO (PHP Data Objects). You’ll understand why PDO is the preferred modern approach over mysqli, and you’ll practice making secure, database-driven applications. We’ll cover prepared statements, CRUD operations, and error handling—everything you need to confidently connect PHP with MySQL (and other databases).
Security is non-negotiable in today’s world. That’s why this crash course includes a dedicated section on Secure PHP Programming. You’ll learn how to protect your applications against common vulnerabilities such as SQL Injection, XSS, and CSRF. We’ll also cover input validation, password hashing, and secure session handling, ensuring your applications are safe and production-ready
By the end of this crash course, you’ll not only understand intermediate PHP concepts—you’ll also be able to apply them directly to real-world projects.
What you’ll learn:
Core OOP concepts in PHP and how to implement them
How to use PDO for secure database interactions
Best practices for writing secure PHP applications
Real-world coding exercises to strengthen your skills
Who this course is for:
Students who know PHP basics and want to advance their skills
Beginner developers looking to step into professional-level coding
Anyone interested in learning how to build secure, database-driven PHP applications
Take this crash course today and level up your PHP skills so you’ll be ready for freelance projects, job interviews, or your own startup ideas!