Sign In | Subscribe

Enter your Sign on user name and password.

Forgot password?
  • Follow us on:
Start learning today, and be successful in your academic & professional career. Start Today!
Loading video...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Introduction to PHP
  • Discussion

  • Study Guides

  • Download Lecture Slides

  • Table of Contents

  • Transcription

  • Related Services

Lecture Comments (11)

0 answers

Post by Maureen Dempsey on March 18, 2013

very nice intro

1 answer

Last reply by: Austin Cunningham
Wed Jun 11, 2014 4:51 PM

Post by Suresh Manchala on November 14, 2012

Hi Matt,

Is there any pre-requisite to learn PHP. I do not have any kind of programming knowledge.

0 answers

Post by Jason Darcy on September 24, 2012

Hi Matt,
Do you know if will have classes on database in the near future? If so, when do you think they would upload it.


1 answer

Last reply by: Matthew M.
Wed Apr 11, 2012 4:11 PM

Post by Callistus Elue on April 2, 2012

Hi Matthew, I just watched and took notes on your introduction to PHP lecture. It was quite enriching. I am currently in an M.Sc Physics program, and taking a course called Computational Physics wherein am encountering for the first time concepts like variables, expressions,statements, operator. could you guide me more on how progress in the Computational Physics?
Meanwhile I will progress in all the lectures of the Computer Science. Thanks. Mark

2 answers

Last reply by: Suresh Manchala
Wed Nov 14, 2012 1:26 AM

Post by Jonathan Bello on March 16, 2012

Hello, I look forward to learning PHP.

How much time should be spent in order to become proficient PHP programmer? After I have went over the lectures.

1 answer

Last reply by: Matthew M.
Wed Nov 9, 2011 4:37 PM

Post by David Kheladze on October 15, 2011

Just wanted to thank you. I have watched several of your videos and this course greatly exceeded my expectations. You have awesome teaching skills. Very well organized and mapped out course. This beats 10x300page books.

Course Introduction

  • PHP is a general purpose scripting language that is most commonly used for creating dynamic webpages and interactive web applications.
  • It is a free and open source language that is behind some of the web's most popular frameworks and Content Management Systems (CMS):
  • With PHP, you can do things like generate dynamic HTML content, process user input, and even perform complex services, such as handling credit card transactions.

Course Introduction

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

  • Intro 0:00
  • What Is PHP? 0:12
    • PHP Hypertext Preprocessor
  • Why Learn PHP? 1:09
    • Why Learn PHP?
  • Web Application: Educator Store 2:25
    • Web Application: Educator Store
    • Example of Web Application
  • PHP in the Educator Store 7:12
    • Dynamic Content Generation
    • Ease of Website Maintenance
    • Form Input Processing and Access to Advanced Functionality
  • What You Will Learn 9:36
    • What You Will Learn
  • Who Is This Course For? 10:56
    • Who Is This Course For?

Transcription: Course Introduction

Hello, and welcome to the first lesson in's Introduction to PHP course.0000

In today's lesson, we will be providing an overview of the material0005

that we are going to cover in this course, as well as providing an introduction into what PHP is.0008

What actually is PHP?0015

Well, the name itself is a recursive acronym that stands for PHP Hypertext Preprocessor.0016

The name is not so important as actually what PHP is.0023

What PHP is, is a general-purpose scripting language, which is a particular kind of programming language.0025

Its most common use, and the use we are going to be using it for in this class,0032

is as a server-side scripting language that allows you to create dynamic web pages and interactive web applications.0036

It allows programmers to create web pages that have dynamic page content, such as dynamically-generated search results.0044

It allows programmers to create web pages that can process user input, such as input from HTML forms.0053

It allows programmers to have a code that performs services, like accessing databases and even processing credit card transactions.0060

There are actually a lot of server-side scripting languages out there in the world; why learn PHP?0070

In this slide, we are going to go over some of the reasons.0077

The first one is that it's the most popular server-side scripting language in use today, by far.0080

Additionally, it is free and open-source, and it works on all major operating systems and with the majority of modern web servers.0086

Additionally, you can quickly and easily get started with it, but it also provides advanced features.0095

So, it's a powerful and robust language.0101

One of its key features is that it can easily interface with most modern databases, like MySQL.0104

It does so using built-in extensions that come directly with the PHP core.0110

And finally, it is also the language behind some of the Web's most popular Web frameworks and contact management systems,0116

such as CakePHP, CodeIgniter, and Zend Framework, which are three different common frameworks used,0123

and then, some content management/web framework systems, such as Drupal, Joomla!, and WordPress.0130

Additionally, PHP, because it is so widely used, has an extremely large user base and is extremely well-documented.0137

In this course, we are going to be teaching the concepts of PHP by building up a fully-functional sample Web application.0147

The Web application we are going to be creating is a mock Web store called the Educator Store.0156

It is going to do a couple of things.0163

It is going to implement a simple shopping cart, and it is also going to have a form0164

where customers can email their comments to the store administrator directly.0167

If you go ahead and continue on with the PHP course sequence here at and take the Advanced PHP course,0173

the development of this Web application will continue in the advanced course, as well.0180

When new concepts are presented, like session management, MySQL database integration, and object-oriented design,0185

you will be able to see how they get integrated into this Web application that we started off in the introductory lesson.0193

Let's actually take a quick look at what the final Web application is going to look like.0199

If we browse to the final version of our Web app, and we go to the homepage (it's called store.php),0210

you can see, it's a simple store interface.0216

Basically, it has a couple of different departments: Apparel, Electronics, and Sporting Goods, each with a couple of different items in it.0219

Right now, it's just the basic store; it just has a few items.0226

If you click on any of the department names (for example, in this left-hand navigation bar--bring this up and make it a little bigger),0229

you can see the items that are contained in that department--in this case, an LCD television and a DVD player.0238

It shows the price of the items.0245

And actually, if you click on any of the items, it takes you to an information page for that particular item.0247

It shows the item's number, its price, a larger image of the item, and then a comment or description about what the item is.0253

The Web store also provides a simple Shopping Cart form0262

that allows you to select which items in the store you would like to purchase, and then go ahead and check out.0267

If we go ahead, for example, and select one of each of these items that are currently in the store,0272

and go ahead and check out, it is going to calculate our Shopping Cart total.0282

In this case, it is going to be using a sales tax calculation as well.0287

And then, it is going to ask you to enter your shipping information.0291

I'm just going to go ahead and enter some sample information here.0295

And then, what you can do is: it allows the customer to click on the Complete Order button.0309

What it is going to do is output a message saying that your order was completed on a certain date at a certain time.0318

It is going to tell you the total of the order,0323

and it is basically going to echo to you the address that you provided for shipping the products you chose in the Shopping Cart.0325

The other thing it is going to be doing behind the scenes is:0334

it is actually going to be integrating email functionality, so that when a customer submits an order on the website,0336

an email is sent to the store administrator containing the information about the Web order.0343

For example, if we load our email client (in this case, Thunderbird), and we look at the email that was generated from this Shopping Cart,0349

we can see, it is an email that was sent that says, "Your order from Educator Store was made on this date and time."0357

And then, it provides a description of the different items that were purchased, their prices and which quantities,0363

the total of the order, and then the shipping information for the customer.0368

The other option that the store provides is a Contact Us form,0374

which allows a user to email comments about the store to the store administrator,0378

which is a common functionality on many websites out there.0383

I'm just going to go ahead and demonstrate this quickly--provide some test comments to the site.0387

When the user goes ahead and clicks on the Contact Us button, it's going to send out an email to the store administrator.0399

In this case, it outputs a message that says "Thank you for your comments."0406

And actually, the store administrator can go and look in their store admin account (in this case, we're using Thunderbird),0409

and we can see the comments that were submitted by the user.0420

It says, "Matthew Machaj has had some comments for the store," and then lists the comments that I had submitted.0423

This Educator store is interesting, because it demonstrates many of the features and capabilities that are what make PHP so great.0434

One of the main things it does is: it shows the use of dynamic content generation.0443

You can see that when we go back to our Shopping Cart.0447

And if we select one item from the store, and we go to Checkout, you can see, it calculates the total and then outputs it.0456

This total is not hard-coded into this HTML page.0463

It is something that is dynamically calculated and dynamically output each time a user submits a Shopping Cart.0467

Additionally, the store demonstrates how using PHP can ease website maintenance.0476

The way it does that is sort of allowing a template system to be developed.0481

For example, if we look at any of the items in the store, the URL of the items--0486

the page that displays the items' information is actually all the same URL; it is called item.php.0493

But what PHP allows us to do is to pass information (in this case, an item ID) to the web page,0499

so that it can dynamically load information about a particular item and load it up for the user.0506

What that allows us to do is have one PHP page to maintain that outputs information about a particular item,0512

even though we may have thousands of items in the store.0518

That greatly increases the maintainability of the application, because instead of having to have a separate page for maybe 1,000 items in the store,0521

we have one PHP page that is just able to load information from sort of a database.0528

We are not going to use the actual database here, but sort of a catalog that is on the back and contains information about all of the different items in the store.0533

Additionally, the store shows how, with PHP, you can use form-input processing.0543

We saw that in two places.0547

One was where the user entered their shipping information; that was an HTML form.0548

And then also, when the user submitted comments in the Contact Us form...0553

It also shows how PHP provides a lot of built-in-advance functionality.0557

For example, in this application, we use email functionality in two spots--0562

both in emailing the contents of the order to the store administrator, and also emailing a user's comments from the Contact Us form.0566

What are you actually going to learn about PHP in this course?0578

First, you are going to learn about some Web fundamentals--the basics of how websites and PHP work together.0582

And then, we are going to go through and teach you how to set up a local PHP development environment,0589

which will allow you to practice the code examples in the course, work on the homework challenges, and begin to develop your own PHP code.0594

This is a key issue to go over, because that is one of the common roadblocks for a new PHP developer:0603

actually getting their development environment set up.0608

We are going to help to walk you through that process.0611

Additionally, we are going to cover all of the PHP programming basics: things like syntax, datatypes, and variables.0613

There are a bunch of other things you can see here, such as constants, operators, control structures, and even user-defined functions.0619

We are going to learn how to process form data in PHP, which is going to include a review of how to use HTML forms.0625

One of the most interesting things is: we are going to learn how to use include files and user-defined functions0633

to develop scalable and flexible Web applications.0638

The way we are going to learn how to do that is by being able to reuse code in multiple spots.0641

We are also going to cover solid programming practices and methodologies, so that you become a good programmer.0646

Who is this course designed for?0658

Basically, it is designed for Web developers seeking to build their Web development skill set,0660

so that they can learn to add dynamic content and advanced functionality to their websites.0666

Students, as a basis, should have a solid understanding of HTML, and to a lesser extent, have a menial understanding of Cascading Style Sheets.0673

Additionally, one of the key things to note is that it is assumed that students have little or no prior programming experience.0684

So, this is not only an introduction to PHP, but in a way, it's an introduction to programming.0691

Because of this, the course actually kind of breaks down into three different categories of material.0695

The first one is just going to be programming basics.0702

This is programming concepts (such as what a variable is, what an if statement is...) that apply to all programming languages.0704

And then, we are going to learn how to apply that specifically using PHP.0710

We are also going to be covering Web fundamentals (such as, again, how the Web works).0715

We're going to be learning about the http protocol, for example, and how that relates in a PHP-specific way.0720

That ends today's lesson; thank you for watching look forward to seeing you at the next lesson.0728