PHP For Beginners

PHP For Beginners

  • 27 videos
  • 04 h 05 min
  • Beginner
  • FREE

Overview

We all start somewhere. For programming, this series is that first step. I've designed it specifically for newcomers to, not just PHP, but programming in general. Here, you'll learn the fundamentals of PHP - all the way down to defining basic variables and arrays.

Think of this series as a key stepping stone for your programming journey.

Episodes

    SECTION 1 The Fundamentals

  • How to Choose a Programming Language

    01:21

    How exactly do you choose a first programming to learn? Why PHP, and not Ruby? And what about JavaScript or Python? How can you possibly be expected to make an educated decision at this early stage of your learning?

  • Tools of the Trade

    08:37

    Before we can dig in, we must first create the world, so to speak. To follow along with this series, you'll need to install a handful of essential tools. Let's go over them in this episode.

  • Your First PHP Tag

    08:09

    Our first order of business is to prepare some basic HTML, boot a PHP server, and view it in the browser.

  • Variables

    07:18

    Okay, let's move on and review basic concatenation and variables. The first time I learned about variables, my first thought was, "But why?". Let's talk about it!

  • Conditionals and Booleans

    11:06

    For this next episode, we'll build a quick webpage that displays a dynamic message based upon whether or not you've read a particular book. This will give us the opportunity to review both

  • Arrays

    08:37

    Arrays At this point, you know how to create a variable for a primitive string or number. But what about situations when we want to declare a collection, or list of things? A list of usernames, or book titles,

  • Associative Arrays

    07:19

    Let's stick with arrays just a little longer. In this episode, you'll learn the syntax for accessing individual items within an array. You'll also learn about associative arrays, which allow you to

  • Functions and Filters

    12:20

    Congratulations for making it this far! Let's take things a step further now and review functions. You can think of functions as the verbs of the programming world.

  • Lambda Functions

    12:08

    Buckle up, because we have a lot to cover in this episode! As part of our first code refactor, we'll discuss what lambda functions are, as well as when and why you might reach for them. Lambda Functions Buckle up, because we have a lot to cover in this episode! As part of our first code refactor, we'll discuss what lambda functions are, as well as when and why you might reach for them.

  • Separate Logic From the Template

    08:35

    Before we move on to the technical check-in for this chapter, let's set aside a bit of time to discuss code organization and why we might want to separate our PHP logic from the view, or HTML.

  • Technical Check-in #1 (With Quiz)

    04:53

    Before we move on to section two, let's do a quick technical check-in to ensure that everything you've learned so far has been committed to memory. And don't forget to complete the quiz before

  • SECTION 2 Dynamic Web Applications

  • Page Links

    11:07

    Welcome to section two! While section one focused entirely on the initial fundamentals of PHP, now, we'll move on and learn what it looks like to build a typical PHP application with a MySQL database.

  • PHP Partials

    09:10

    In the previous episode, we begrudgingly duplicated the same HTML for every PHP view. Let's fix that now by reaching for PHP partials.

  • Superglobals and Current Page Styling

    12:57

    Often, you'll need to apply styles or trigger certain logic based upon the current page. Luckily, we can use PHP's $_SERVER superglobal array to dynamically determine the current page.

  • Make a PHP Router

    12:10

    I think your PHP skills have now matured to the point that you're ready to build a custom PHP router from scratch. This will give us the chance to discuss code organization, response codes, and more.

  • Create a MySQL Database

    06:10

    We're now ready to begin interacting with a MySQL database. Before we write any PHP, let's first review how to connect to MySQL, and then create a database and table.

  • PDO First Steps

    14:24

    The next step on our journey is to figure out how to connect to MySQL from PHP and execute a simple SELECT query. We'll of course reach for PHP Data Objects, or PDO, to orchestrate this task securely.

  • Extract a PHP Database Class

    10:34

    Now that we understand the basic logic for initializing a PDO instance and executing a prepared query, let's clean things up a bit by extracting a dedicated Database class.

  • Environments and Configuration Flexibility

    12:59

    We have one glaring issue with our Database class right now. The connection values have been hard-coded. So what happens when we push the project to production, where the host and port are entirely

  • SQL Injection Vulnerabilities Explained

    10:56

    In this episode, we'll review some examples of SQL injection and discuss why it's so important that you always assume that, on the web, a person is guilty until proven innocent.

  • SECTION 3 Notes Mini-Project

  • Database Tables and Indexes

    07:52

    You've learned enough of the fundamentals at this point to begin working on your first mini-project. Let's make a notes app! We'll begin with the initial database structure, which will give us the

  • Render the Notes and Note Page

    14:27

    Now that we have the initial database structure in place, let's create one page to display all of John Doe's notes, and then another page for each individual note.

  • Introduction to Authorization

    14:27

    In the previous episode, we added support for reading all notes that were created by a particular user. But, in doing so, we unwittingly introduced a major security concern. In this lesson, we'll discuss

  • Programming is Rewriting

    12:17

    Before we move on to building a form to persist new notes to the database, let's take ten minutes to refactor our current code and discuss wrapping up APIs you don't own.

  • Intro to Forms and Request Methods

    00:18

    We're overdue, but it's finally time to dig into forms. In this lesson, we'll learn how to submit a form using two different request methods. Next, we'll discuss how our controller might detect whether a POST

  • Always Escape Untrusted Input

    08:21

    In this lesson, we'll finally persist a new note to the database. But, in doing so, you'll be introduced to a new security concern that requires us to always escape user-provided input.

  • Intro to Form Validation

    12:50

    In this lesson, we'll review two layers of form validation: browser and server-side. We can use validation to ensure and confirm that the user submits their data in the exact format that we require.

Reviews

No review yet.

Author


Jeffrey Way Profile Picture

Jeffrey Way

Hi, I'm Jeffrey. I'm the creator of Laracasts and spend most of my days building the site and thinking of new ways to teach confusing concepts. I live in Orlando, Florida