Browse Courses
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

Bookmark and Share
Lecture Comments (26)

0 answers

Post by Harlan Reece on January 2, 2015

When I installed XAMPP on my Windows 7 machine, it did not include the sample files that we have been working with.  I had to actually create the Intro2php folder myself. Could this possibly have something to do with installing from .exe file rather than zip archive. Apache doesn't seem to work when I use the zip file installation.  Pleae respond ASAP.  By the way, what is the difference between the 2 installations and why did you recommend the zip archive installation?

0 answers

Post by Mario Valcarcel on July 31, 2013

How I fix it this problem

AM  [Apache] Status change detected: running
6:51:37 AM  [Apache] Status change detected: stopped
6:51:37 AM  [Apache] Error: Apache shutdown unexpectedly.
6:51:37 AM  [Apache] This may be due to a blocked port, missing dependencies,
6:51:37 AM  [Apache] improper privileges, a crash, or a shutdown by another method.
6:51:37 AM  [Apache] Press the Logs button to view error logs and check
6:51:37 AM  [Apache] the Windows Event Viewer for more clues
6:51:37 AM  [Apache] If you need more help, copy and post this
6:51:37 AM  [Apache] entire log window on the forums

1 answer

Last reply by: Shimon Cohen
Mon Oct 27, 2014 3:08 PM

Post by Reginald Hairston on March 4, 2013

Do you have a recommendation for a Mac text editor?

1 answer

Last reply by: Edward Harrison
Wed Oct 31, 2012 1:49 PM

Post by Edward Harrison on October 30, 2012

I am unable to view the Document root as:

It only works as:

Why is this? It will be essential to know as part of learning PHP is understanding paths, etc.

0 answers

Post by yana gafouri on September 3, 2012

I have Mac OS, should I download XAMPP for Mac OS? Could you please provide specific for Mac OS instructions? Thank you. Yana

0 answers

Post by Elizabeth Etta on August 4, 2012

I would be grateful if this can be answered for me. I have written a basic hello world php code. However whenever I paste I run it on the browser it just prints my php code on the screen. I have followed the instructions to go into the http.conf file and I typed the instructions into the file given by matthew Machaj.

PHPIniDir "C:/Users/user1/xampp/php"
LoadModule php5_module "C:/Users/user1/xampp/php/php5apache2_2.dll"
AddHandler application/x-httpd-php .php

When I try to start the xampp control panel it runs and immediately stops
When I try to run xampp_start I get an error in the cmd prompt that opens up.

The error is like this module php_5 module is already loaded, skipping

Error line 513 of C:/Users/User1/xampp/apache/conf/httpd.conf
Only the first PHPInIDir directive honored per configuration tree- subsequent ones ignored

Any help will be greatly appreciated

0 answers

Post by Charles Georg on July 31, 2012

Hello, Im having a problem getting the XAMPP splash page to come up when I enter Where do you get that information. Thanks

0 answers

Post by Tomas Dale on July 6, 2012

I have the IIS installed in the machine and when I try to open apache it opens IIS, how can I have both Web Servers running ?

0 answers

Post by Abdul Sidibe on June 2, 2012

I use mac. does the process apply with regarding to unzipping of xampp?

1 answer

Last reply by: Matthew Boone
Wed May 23, 2012 2:29 PM

Post by Matthew Boone on May 23, 2012

Any reason I couldn't use dreamweaver instead of pspad?

1 answer

Last reply by: Gowri Meenakshi
Thu May 10, 2012 10:34 AM

Post by Gowri Meenakshi on May 10, 2012

I have windows 7. After downloading zip , extracted to c:\Users\user1\xampp i was trying to run setup_xampp.bat file..lot of lines like

.\install\awk.exe: can't open file C:\Users\user1\xampp\apache\conf\extra\httpd-
source line number 8

shown and when i check using xampp_control Apache server is not working.. localhost\ returns error.. Skype is not loaded. Help me..

1 answer

Last reply by: Jonathan Bello
Tue May 8, 2012 9:47 PM

Post by Jonathan Bello on May 8, 2012

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.
Error 404

What should I do? I followed step by step from the video.

0 answers

Post by Nitheesh Menon on May 8, 2012

Dear Mathew ,when ever i type firebug on add on search bar i am not getting the firebug 1.7.3 instaed i am getting these two fire bug auto completer 1.4.0 and flas firebug 3.4.2 which one u want me to install...?waiting for your reply

0 answers

Post by Val S on April 15, 2012

Could you please post some instruction on how to set up the web environment for a mac OSX 10.6.x?

I installed xampp for mac but i'm unable to create new folders in the Applications-->XAMPP-->htdocs folder

4 answers

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

Post by anthony sparks on February 24, 2012

this video isnt going past 20:40. i tried running it on multiple browsers and it still wont buffer pas this point. What should i do?

1 answer

Last reply by: Matthew M.
Tue Feb 7, 2012 3:14 AM

Post by Herve Gnidehoue on December 22, 2011

Can U please help for my development environment? The web resources are not very helpful. The Apache is running well but I don't think that the PHP is working. I am pretty sure there is a sort of configuration to be done, a file to be copied from one location to another as far as the PHP is concerned but I don't know how. I've tried several times but in vain.

Setting Up Your Development Environment

  • A development environment is a setup that allows a programmer to write, test, and debug software.
  • Having a PHP local development environment is when your test webserver runs on the same machine where you do your PHP coding.
  • In this course, we will use a local development environment that runs on a Windows 7 machine using the Firefox web browser, the XAMPP software distribution, and the PSPad text editor for Windows.
  • XAMPP is a software distribution that bundles PHP and the Apache webserver, along with several other pieces of software, that facilitates the setup and configuration of a PHP-enabled webserver.
  • PHP version 5.3.5 will be used in this course.
  • is known as the 'loopback’ IP address, and it is used to refer to a locally running webserver. localhost is the hostname mapped to the loopback IP address.
  • The term Document Root refers to the root folder on a hard drive where files accessible via a webserver are stored. Only files stored in the document root and its subfolders can be served by a webserver.
  • For XAMPP, the document root is named htdocs , and it is located in the root XAMPP installation folder. http://localhost/ maps directly to this folder in the default XAMPP setup.
  • Here are links to some additional resources if encounter problems setting up your PHP development environment:
  • Course software download links:

Setting Up Your Development Environment

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.

Transcription: Setting Up Your Development Environment

Hello again, and welcome back to's Introduction to PHP course.0000

In today's lesson, we are going to go over how to set up your development environment.0005

Specifically, we are going to talk about what development environments are, and then go over a couple different kinds of development environments:0010

one known as a remote development environment, and one known as a local.0017

We are going to talk about the software that we are going to be using in this course for our development environment.0021

And then, we are going to go over a couple of concepts related to web servers, and what is known as local development.0026

Basically, we are going to be talking about the loopback IP address, and we'll explain more about that, as well as the localhost host name.0033

We are also going to talk about the concept of a document root.0040

We are also going to go over a description of the different kinds of text editors that are available,0044

and go over our PSPAD installation, which is the text editor that we are going to be using for this course.0049

And then, we are going to finish up with a section that provides some additional resources for finding help in setting up your development environment,0055

and then also, introducing our first homework challenge.0062

What exactly is a development environment?0066

Well, essentially, it is just a setup for a programmer to be able to write and test and debug their software.0069

What we have done for this course is: we have chosen a default development environment setup that we are going to use throughout the course.0076

The reason for that is that, unfortunately, one of the biggest roadblocks to new PHP developers0084

is actually just getting their development environment set up so that they can actually run PHP code and test it.0090

Part of this reason is that PHP and Apache (which, as we learned in the last lesson, are two pieces of software that need to be configured to work together)0096

can be quite difficult to do that.0106

And so, we are going to install some software for this course that is going to help ease that problem.0108

For our default environment that we are going to be using, we are going to be running it on a Windows 7 platform.0115

The reason for that is: I feel that that is the most popular operating system, and will be able to reach most of the students out there,0121

the idea being that you will be able to mimic the steps that we take in this lesson,0127

so that you will be able to get your development environment set up with as much ease as possible.0132

Additionally, we are going to be including software components as part of our development environment that have a couple of key features.0140

We are selecting components that are free, so that all of the students will be able to download them.0148

We are picking things that are easy to install and configure.0152

And additionally, we are picking software that is available for most major operating systems.0156

So, even though we are going to be walking through the setup of the development environment on a Windows 7 machine,0160

all the software that we are going to be using (except for the text editor) is available for most operating systems,0165

so if you develop on a Macintosh or Linux or Unix machine, you will be able to get the same versions of the software we are going to be using.0172

The text editor, as mentioned, is only available on Windows machines; but there are literally hundreds of text editors out there on the Web,0180

so doing a simple Google search should be able to find you a compatible text editor that will work for use in this course.0187

Additionally, the software that we have chosen is well-documented.0195

It has a large user base, so that there is a lot of information out there that will help you if you get stuck in configuring it,0199

for example, if the default configuration that we set up in this course doesn't work for you.0205

Additionally, the software that we are going to be using is actually software that is used in the real world.0210

We are going to be using the latest version of PHP, and also the Apache web server, which is the most common web server that is used in the world.0214

The other thing to note is that the development environment we are going to be setting up for this course0223

is going to be the same development environment that we are going to use in the Advanced PHP course, with some slight modifications.0227

So, for those of you that continue on in the PHP course sequence here at, 0233

you will be able to continue to use that same development environment, without having to reinstall everything over again.0238

One thing I want to talk about first is: there is a thing about this remote development and local development.0246

Basically, "remote development" refers to where a programmer develops their code, or their websites, their PHP pages,0252

on their local machine, and then the way that they test them is by uploading them (typically by FTP)0260

to a remote server, where they can be run and be tested.0267

Now, we learned in our last lesson that, in order to basically view and serve PHP pages, we need three pieces of software.0271

On the client side, we need a web browser to request the web page to be viewed.0283

On the server side (in this case, it's called the remote server), we need the Apache web server that is able to serve HTML documents,0288

and also is able to pass on--if PHP files are requested--those requests to the PHP Interpreter,0296

so that the PHP Interpreter can generate HTML output and pass it back to Apache to pass it back to the client.0304

So, in order to be able to serve and view PHP pages, we need a web browser, the Apache web server, and the PHP Interpreter.0310

Additionally, for development, we need a way to code our text files or our PHP files that we are going to be using.0321

And so, we need a fourth piece of software that is going to be a text editor.0327

And basically, the way that it works in a remote development environment is that, typically,0332

the web browser and text editor are on your local machine, and the remote server contains the web server0336

and the version of PHP running that is going to generate your dynamic web pages.0343

What happens is: you will create some PHP file on your local machine (for example, a .php file).0349

And then, what you will do is: you will typically use FTP to upload that PHP file to your web server.0356

Then, in order to test the software, you are going to open up your web browser, 0364

create an http request for the particular PHP file that you are wanting to test,0369

and then the typical process for loading a PHP file occurs.0376

Apache is going to let PHP know that a PHP file has been requested.0380

PHP will load it from the hard drive, parse it, and generate HTML, which it will pass back to Apache, which Apache then forwards on to the client.0385

This is basically the scenario that happens.0396

For those of you that have been Web developers before, that have a web host,0397

typically what you do is: you develop your HTML files on your local computer.0402

You upload them to your web host, maybe to a temporary directory, and then view them there to test them out.0406

This is an example of remote development.0412

What we are going to be doing in this course is setting up a scenario for a local development, or a local development environment.0415

What you can see is that, over here, we actually don't have this remote machine involved anymore.0421

All of the software that we had in the remote development environment, we are still going to have,0426

but it is all going to be run on our local development machine.0431

So, on whatever computer you are developing on--your Windows 7 machine--we are going to have the Firefox web browser software installed.0434

We are going to install the Apache web server; we are going to have PHP installed; and then, we are also going to have a text editor installed.0442

What happens is: basically, there are a number of benefits to doing this.0450

A lot of it has to do with increasing your efficiency as a developer, because now, when you create a PHP file,0455

in your text editor, on your local machine, instead of having to FTP it across the Internet to Apache,0464

that FTP simply becomes a local saved file to your hard drive.0471

Because your Apache server is running on your local computer, Apache and PHP just need to load that file from the local hard drive.0475

So, we don't need that FTP operation, and we eliminate one of the network interactions that takes time.0482

It takes time to upload files by FTP.0491

Additionally, when we want to test a file, we don't actually have to go out on the Internet.0495

We just point our browser at our local Apache server, and it is still going to generate an http request,0499

but it is not going to go out over the Internet.0505

It is going to stay local within your computer.0507

So that, again, eliminates another network connection that you have.0510

Another added benefit of this is that, by having your web server and PHP all on your local development machine,0513

you can actually develop while you are offline--while you are not connected to the Internet--0520

because you don't need to be able to FTP to a remote server, nor do you need to connect to a remote server to test your pages.0524

The other benefit that you get from having these things installed locally is that you have access to all of the configuration files--0532

for example, for the Apache server and for the PHP Interpreter.0540

You have access to those configuration files, whereas for example, if you are using a web host and have a shared web hosting account,0545

you may not be able to alter the PHP configuration.0552

Now, because we are going to be developing, 0556

we may want to set some configuration settings that will be useful for development, so we want to be able to make those changes.0558

And also, as we are learning PHP, we are going to be changing some of these settings.0563

And by having that configuration file that we can edit on our local machine, we will be able to experiment with different settings,0567

and it will help us in learning PHP and how to do PHP development.0574

The software that we are going to be using in this course, basically, 0583

is the four pieces of software that we talked about: a web browser, Apache, PHP, and a text editor.0586

For the web browser, we are going to be using Firefox, which is an open source web browser that is free.0592

One of the main reasons we are going to be using it is because it has an add-on called Firebug,0600

which basically adds a bunch of Web developer tools to the browser that make it easier to do Web development,0603

and also that we will be able to use to help us diagnose problems with our PHP scripts,0610

for example, when we get into dealing with input data from HTML forms, such as something known as GET input data.0615

Actually, if we go and take a look--I have already installed Firefox, and basically, this is the link provided on that slide,0623

which will also be provided in Quick Notes, to where you can download Firefox.0630

Simply click on the download link; it is going to pop up a window allowing you to download an executable file.0633

And you simply run and install it, just as you would any other Windows application; it's a pretty straightforward and quick process.0639

Now, to install the Firebug add-on--that is actually something you do directly from Firefox.0646

The way you do that is: you go to the Firefox menu; you click on the Add-ons option, and Get Add-ons is going to load up.0650

In the Search Add-ons box, simply type Firebug.0659

What that does is searches all of the plug-ins and add-ons that are available for Firefox.0662

And we can see that Firebug pops up as one that is available.0668

We simply click on the Install button; what it is going to do is actively download that add-on in real time.0672

It has basically already installed it in this short amount of time, and then it asks you to restart Firefox in order for the changes to take effect.0680

If we click on Restart Now and wait a couple of seconds while the browser reloads (and actually, you can see that it already has),0688

what you will notice, actually--it's kind of subtle, but in the bottom right-hand corner of the screen, you will notice this little bug.0702

If you click on it, it opens up this tool panel at the bottom.0709

This is what Firebug is: it's a panel of different tools that allow you to diagnose and figure out problems that are going on with your web application.0714

And so, that is how you know it successfully installed--the little bug appears down here.0724

You can go ahead and close that by clicking on the bug again.0727

That is Firefox and the installation of the Firebug add-on.0730

The other piece of software we are going to be installing is actually a software distribution; it is called XAMPP.0736

What it is: it is a combination of a number of different pieces of software that are combined together in one distribution,0742

and set up so that they are easy to configure with one another.0749

In particular, XAMPP contains PHP (in this case, for the version we are going to be using--1.7.4).0753

It contains PHP version 5.3.5, and it contains the Apache web server version

What we do is: we simply download this software distribution.0768

It is going to contain Apache; it is going to contain PHP, along with a number of other different pieces of software.0771

For example, it is also going to include the MySQL database.0776

And what it does is: it also provides some configuration files that make it easy for you to get Apache and PHP set up to work together.0780

That is one of the main reasons that we are using this software distribution: 0788

because getting Apache and PHP to work together can be a very difficult task.0792

Also, the other piece of software that we are going to be using, that is mentioned, is the PSPAD text editor.0798

It is a Windows-based text editor, and it can be accessed at this link.0803

You simply go and download the executable file and run it, just like you did for Firefox; it's pretty simple.0807

For XAMPP, it's going to be a little bit different.0814

There are a couple of different options available at this link, which again, will be available in the Quick Notes.0816

I'm going to have you download the ZIP archive, and not the EXE file.0821

And actually, I'm going to walk through that XAMPP installation now.0825

The first thing for the XAMPP installation is actually: let's go look at the XAMPP website.0831

It is at a website called; we want XAMPP for Windows.0837

If you scroll down this page and pull it up a little bit, you can see the different downloads.0842

There is going to be a Windows Installer and then a .zip file.0847

What we want is: we want to install the .zip archive; we want to download the .zip archive.0853

I have already downloaded that; and the first thing you do is: we are going to unzip that software distribution.0859

Now, I have actually already gone ahead and done that, because it takes a while; it's a pretty large file--it takes a while to unzip all of the contents.0869

But for this course, we are going to unzip that XAMPP software distribution into a directory called XAMPP.0874

You should put it in your Windows User directory.0882

The reason for that is related to permissions: we could install it in the Program Files directory, or maybe on the root hard drive (for example, the C drive);0886

however, because one of the things we mentioned that we want to be able to do as new developers is0895

to play with the configuration files, if you install, for example, the XAMPP distribution in the Program Files directory,0900

you run into problems when trying to edit the configuration files; you run into permissions issues.0907

Typically, that can be avoided by placing the XAMPP distribution within your User directory, 0912

because you have full read and write permissions, 0917

which will allow us to pretty easily change the configuration for PHP, and if we need to, Apache as well.0919

You unzip the file into an XAMPP directory in your user directory, and then the next thing you do is: 0926

you run this setup script, or a batch script, that XAMPP provides for you, that is going to get everything configured and set up to work together.0932

If we go to where...Educator1 is the name of our user directory on this computer--0941

we have gone ahead and unzipped the XAMPP distribution into the XAMPP directory.0947

And you can see here, this is the contents of the XAMPP distribution.0954

What we are going to do is run the file called setup_xampp.bat, and that is the batch file that is going to set up XAMPP on your computer.0958

If we go ahead and click on that, what is going to happen is: a Windows command prompt is going to pop up.0966

And you may or may not be able to see the text in this window, but it basically says, in this case,0971

that it was successfully installed and configured, and press any key to continue.0977

If we go ahead and do that, XAMPP is properly set up on this computer.0980

Now, that being said, the next step that you want to take is to verify that the installation actually worked.0988

There can be some problems that occur.0993

The first thing that you do is: you start XAMPP; and you do that by running a file called xampp-control.exe in the XAMPP directory.0996

If we go ahead and go to our XAMPP directory, and we double-click on xampp-control.exe, this control panel for XAMPP is going to pop up.1005

And you can see, it has a number of different buttons on here.1013

The first one is a start button that relates to the Apache web server.1016

The next step that we are going to take, when we start XAMPP, 1020

is to go ahead and click the Start button next to Apache, so that our Apache server will be up and running,1023

because we need that to serve files locally on our computer.1029

So, assuming everything works right, you will see a little message here that says "running," that lets us know that Apache is up and running.1032

One recommendation I would have would be to put a shortcut somewhere to this xampp-control.exe,1040

for example, on your taskbar, so that it is easy to access, because when we are changing configuration files,1045

you are going to want to be able to access that to start and stop Apache.1052

The next step that we are going to do, now that Apache is started and we know that that was successful1057

(if it wasn't, we would have gotten some sort of error message):1061

we are going to open our browser and browse to this address:

What that is: basically, we are saying we want to view the contents of the root of a web server at this IP address here, using the http protocol.1072

And if XAMPP was installed successfully, and Apache works correctly, we should see a splash screen up here.1085

So, if we go to our web browser, we open a new tab, and we go to, and we click Enter,1092

(oops, I'm sorry, I mistyped http),1104

we see the XAMPP splash screen that is going to allow you to select a language.1109

For this course, we will be using English, so we click the English link.1113

What comes up is the XAMPP control panel; it is another one of the advantages of using a software distribution like XAMPP.1116

It provides a control panel that allows you to configure and play around with the different pieces of software that come with it,1125

especially things besides Apache and PHP, like your MySQL database and so forth.1132

So now, we know that our XAMPP distribution is up and running.1138

If you get to this point, you know that you have successfully installed XAMPP, and your Apache server is working correctly.1140

Now, what you will notice from the last slide is that we went to the address, which is an IP address.1149

It is known as a loopback IP address.1158

Basically, what it does is: when you type that in your web browser, your computer knows that when you go to that address,1160

it is not going to search for a computer on the network that has that IP address.1167

It knows that that address refers to itself--the local computer.1171

When you type that address in your web browser, your computer is going to know that it means,1175

"I want to look for a web server that is running on my local machine," so it is going to look for a local Apache web server.1179

Now, one other way to refer to this IP address is using the host name localhost.1188

Localhost is a name you can type in your browser; it works like domain names...for example, just like does.1194

Whereas, using DNS, translates to a specific IP address--1200

and it's an IP address that computers use to communicate, but you can access it in your web browser by typing,1205

in that same way, we can use localhost and type that host name in our browser,1211

and that is going to refer to this loopback IP address, as well.1215

For the remainder of this course, we are always going to be using localhost to refer to our local web browser,1221

rather than the loopback IP address.1226

We are going to do that for pretty much the same reason why, when you go to,1228

you don't type in the IP address: the domain name or the host name is easier to remember than the IP address.1231

Now, because those refer to the same IP address (localhost refers to, 1238

if we go back to XAMPP or to our web browser, and we type http://, and type localhost this time,1245

what we should be able to do is make a request to our local web browser.1255

And if we hit Enter, we can see that that actually happens.1262

So, localhost and both refer to our local machine with Apache running on it.1266

Now, one thing I want to talk about is a term called a document root.1277

Basically, what a document root is: it refers to a folder on your local hard drive1281

that contains all of the files that are accessible by your web server.1286

Basically, only files that are contained in a web server's document root or its subfolders are typically accessible by the web server.1291

For example, for those of you that have worked with web hosts before,1301

maybe your document root was named something like public_html, or www.1304

And basically, what your web hosting provider would tell you--they would say,1310

"Any files that you want to be made available on your web server--you put them in these directories."1313

For example, every file on your computer is not available by your web server; only files that are put in these specific directories--1320

the document root or its subfolders--are available by the web server.1327

For Apache and the XAMPP installation, the document root is a folder named htdocs that is located in the XAMPP root installation folder.1334

For example, if we go and look at our XAMPP directory, we can see, there is an htdocs folder.1347

And anything that we want to be able to test--that we want to be able to view through the Apache server,1351

which is going to be all of our PHP files, needs to go in this directory or below it.1356

What I am going to do is create a folder that we are going to be using throughout this course1361

to contain example files and the web application we are developing; and I'm going to call it intro2php, with the number 2.1364

So basically, I have created a new directory within our document root.1375

And then, I am going to use PSPAD (which we haven't talked about yet, 1379

but it's the text editor that we are going to be using for this course) to create a simple HTML file.1382

It is going to be a bare-bones file that just has the HTML and body tags, as well as a header tag.1391

We are just going to include a header that says some message.1405

We'll call the file sample.html, so we're going to say, "This is sample.html."1412

My typing is off.1423

When we go ahead and try to save this file using the Save As command, we are going to browse to the htdocs folder in our XAMPP directory.1429

And within that, we are going to browse to the intro2php folder, and we are going to save this file as sample.html.1441

Now, if we go back and we look at our intro2php file, we have this sample.html file here.1452

Well, because this directory (intro2php) is contained within our document root,1458

the files within it are accessible by our web servers, so we can use a web browser to access them.1462

So, because when you go to the localhost and just look at the root directory, what it shows you is the contents of the document root--1469

well, we are not interested in the document root; we are interested in the sample.html file in the intro2php directory within the document root,1481

so we are going to type the URL: intro2php/sample.html.1490

And as you remember, when we talked about URL's, everything after the host name is a path.1496

So, we are saying that we want to find the sample.html file in the intro2php directory 1502

that is within the document root of our web host (in this case, our local web server).1509

And if we go ahead and browse to that page, we can see that our web page loads up.1514

And if we look at the code, we can see that load up some...we can see the source code that we typed.1518

And so, that is how URL's map to files in your local file system.1525

In this example, sample.html, contained in the intro2php directory, contained in the htdocs directory,1533

is accessible by localhost/intro2php/sample.html.1541

That is how URL's map to files within the file system.1547

And also, this is typically how local development is going to go: you are going to be creating a text file in your text editor.1553

You are going to be saving it somewhere within the document root (in this case, into the intro2php folder).1560

And then, using your web browser, you are going to browse to it using localhost to see if it works as expected.1565

Now, I just want to talk a little bit about text editors.1574

To code PHP files--PHP files are just essentially plain text files, and there are a number of different text editors out there which can do that.1577

There is sort of a spectrum of text editors.1588

On one end, you have, for example, Windows Notepad, which is basically a bare-bones text editor.1590

It just allows you to create a text file and save it.1594

On the other end is something like Zend Studio, which is an IDE, or an Integrated Development Environment.1598

What that does is: that is sort of like a text editor on steroids.1604

It provides all sorts of features in addition to just being able to edit text files.1609

For example, it allows things like code completion, code might include some debugging tools or some build tools.1616

What we are going to be using is PSPAD, which is somewhere in the middle of the spectrum.1623

It is actually more towards the bare-bones end.1627

And essentially, PSPAD is a bare-bones text editor with a few little features added on top of it that we are going to make use of.1629

One thing to note is that we are not using Zend Studio or any of the IDE's that are available out there.1638

And there is a specific reason for that, and that is because these IDE's, while very powerful1643

(and they can really make a programmer's life much easier by doing things automatically),1648

that is part of the problem: for example, it will do things automatically for you behind the scenes.1654

And as a new programmer to PHP, you want to really know what is going on.1658

We want to be able to do everything ourselves, so we can really learn how it is going on.1662

If we use the IDE, it is going to be doing things, and we are not really going to be understanding what is going on,1666

which is why we have chosen a more bare-bones text editor.1671

Now, that said, once you become an experienced PHP programmer, it would be great to move to the IDE.1675

That is what professional programmers use, because you allow it to do mundane tasks that you understand how they work,1680

but they are sort of a pain to do; let them do that for you.1688

We need to sort of work through those pains in order to see what is actually going on behind the scenes, to learn how things work.1691

PSPAD is installed, as mentioned before, just by downloading an EXE file from

You are going to download the Windows Installer; and when you install it, you just run through it like a typical installation.1707

This is what PSPAD is going to look like when you open it up.1714

Now, there are a couple things to note.1716

One is: it has sort of a sidebar here that you can disable if you want more screen real estate.1718

You simply do that by clicking on this Tool Panel button in the View bar.1724

Additionally, we are going to be debugging our PHP application, so we are often going to want the line numbers of where errors occur.1730

There is an icon in the Menu bar at the top over here that, when you click on it, goes ahead and shows the line numbers of the pages.1736

That might be something that you want to do.1744

Additionally (and the main reason we have chosen PSPAD)--1747

the additional feature that it provides on top of Windows Notepad is what is known as syntax highlighting.1751

What that does is provides visual cues to you as the programmer to make your files easier to read and to see if you made mistakes.1756

For example, this file, sample.html, that we have right now, that has been saved, doesn't have any syntax highlighting.1764

Everything looks the same--it is all the same color.1770

However, if we go down here, and we click on Text at the bottom of the screen,1772

PSPAD allows us to pick a syntax to view the file in.1776

So, if you click on HTML, you can see that now, the (I'm going to go ahead and blow up the text size here)...1780

You can see that it has color-coded our tags, which provides visual cues that you are using one tag over another.1798

And then, also, for example, let's say we improperly close this H1 tag.1806

Well, now it turns red; and so, that provides you a visual cue as a programmer that, 1811

"Hey, you have made a mistake in your code, and you can go back and correct it."1815

That is the advantage of using PSPAD, and is why we have chosen that, for this added feature.1818

Now, I just want to talk about finding help if you get stuck in setting up your development environment.1827

As mentioned, it can be kind of complicated, setting things up; 1832

and if things don't go as smoothly as they have in this lecture, 1834

I wanted you to be able to have some resources available to go out on the Internet 1837

and be able to find ways to help you solve your problems.1842

Fortunately, there is an abundance of resources on the Web.1846

Two useful ones (and these links will be in the Quick Notes, as well) are: 1848

the first one is for the PHP manual, and this is the installation instructions on the manual,1851

and then also, the link to the documentation for the Apache web server.1856

Additionally, often, a quick Google search will direct you to the answers that you might need.1861

And one thing I want to note is that one of the more common problems in getting Apache up and running and to run locally on your machine1867

is if you have another program that is already bound to port 80.1873

As we learned, a web server takes http requests by listening on port 80.1878

And so, if you have a program--only one program on a computer can be bound to that port at the same time,1884

so if you have another program that might already be bound to that, when Apache tries to start, it is going to have problems.1888

That is one of the more common problems.1894

Now, I am going to introduce your first homework challenge.1898

The first thing I want you to do is go through and complete and verify the setup of your PHP development environment,1900

just like we did in the course.1905

And then, I want you to go ahead and--after you have seen the splash screen and seen that everything works--1907

go ahead and stop Apache and XAMPP; and that will give you practice with stopping and starting those two,1912

because that is something you are going to be doing often.1916

Then, I want you to use PSPAD to create a file named sample.html that contains whatever random HTML markup you want.1919

And then, I want you to save it in the appropriate folder on your computer so that you can browse to it at this URL here.1926

You are going to have to understand what we talked about when we talked about the document root1934

and where the document root is on the XAMPP installation, so that you can do this file successfully.1938

And then, I want you to go ahead and attempt to view sample.html at this address.1944

And assuming you followed step 2 above, the XAMPP and Apache are going to be turned off, 1948

so you are going to get an error saying that you can't make a connection to

What I want you to do is go ahead, restart XAMPP and Apache, and then verify that you can successfully view that sample.html page.1959

That is going to give you practice learning how files on your local hard drive map to URL's in a web browser.1967

And then, also, I just want you to verify that you can view that same file, using the localhost host name, as opposed to the IP address.1975

That is the common convention that we are going to be using throughout the rest of this course.1981

That ends today's lesson; thank you for watching look forward to seeing you next time.1987

I. Introduction to PHP
  Course Introduction 12:13
   Intro 0:00 
   What Is PHP? 0:12 
    PHP Hypertext Preprocessor 0:13 
   Why Learn PHP? 1:09 
    Why Learn PHP? 1:10 
   Web Application: Educator Store 2:25 
    Web Application: Educator Store 2:26 
    Example of Web Application 3:18 
   PHP in the Educator Store 7:12 
    Dynamic Content Generation 7:22 
    Ease of Website Maintenance 7:55 
    Form Input Processing and Access to Advanced Functionality 9:00 
   What You Will Learn 9:36 
    What You Will Learn 9:37 
   Who Is This Course For? 10:56 
    Who Is This Course For? 10:57 
  How PHP & The Web Work 15:32
   Intro 0:00 
   Lesson Overview 0:10 
    Lesson Overview 0:11 
   Client-Server Model 0:53 
    Client-Server Model 0:54 
   HTTP Protocol 2:15 
    Definition of Protocol 2:16 
    Hypertext Transfer Protocol (HTTP) 2:37 
   Uniform Resource Locators 3:46 
    Uniform Resource Locators (URLs) 3:47 
    Form of URLs 4:13 
    Accessing Webpages with URLs 5:13 
   Serving Webpages 6:14 
    Serving Webpages, Client Machine, and Server Machine 6:15 
   Static vs. Dynamic Webpages 8:30 
    Static Webpage 8:31 
    Dynamic Webpage 8:55 
   Server-Side Scripting 9:54 
    Server-Side Scripting 9:55 
   Static and Dynamic Webpage Coding Example 11:17 
    Static and Dynamic Webpage Coding Example 11:18 
   Serving Dynamic Webpages 13:07 
    Serving Dynamic Webpages 13:08 
  Setting Up Your Development Environment 33:11
   Intro 0:00 
   Lesson Overview 0:08 
    Lesson Overview 0:09 
   Development Environments 1:04 
    Development Environments 1:05 
    Our Default Development Environment: Window 7 1:54 
   Remote Development 4:04 
    Development Machine & Remote Server 4:05 
   Local Development 6:54 
    Development Machine 6:55 
   Software Used In This Course 9:41 
    Firefox Web Browser & Firebug Add-On 9:42 
    XAMPP 12:15 
    PSPAD Text Editor 13:16 
   XAMPP Installation 13:49 
    XAMPP Installation 13:50 
   Verify XAMPP Install 16:26 
    Verify XAMPP Install 16:27 
   localhost 19:08 
    localhost and 'loopback' IP Address 19:09 
   Document Root 21:16 
    Document Root and Directory Name 21:17 
    Document Root for Apache in XAMPP: htdocs & Example 22:13 
   Text Editor Spectrum 26:12 
    Text Editor Spectrum: Barebones to IDE 26:13 
    PSPad & Example 27:02 
   Finding Help 30:26 
    Web Resources 30:27 
   Homework Challenge 31:36 
    Homework Challenge 31:37 
   Homework Challenge (cont.) 32:38 
    Homework Challenge (cont.) 32:39 
  Your First PHP Script 12:41
   Intro 0:00 
   Lesson Overview 0:19 
    Lesson Overview 0:20 
   .php To HTML 1:00 
    .php To HTML 1:01 
   PHP Delimiters 2:20 
    PHP Delimiters: Opening & Closing PHP Tags 2:21 
   'Hello, World!' Example 4:34 
    Echo Statement & PHP Tags 4:35 
    Adding Second Heading 7:34 
   Homework Challenge 9:56 
    Homework Challenge 9:57 
  Basic PHP Syntax 40:24
   Intro 0:00 
   Lesson Overview 0:09 
    Lesson Overview 0:10 
   PHP Delimiters 0:38 
    Long and Script Form 0:39 
    Short and ASP Style 1:33 
    Example 2:01 
   php.ini: PHP's Configuration 3:40 
    php.ini 3:41 
    Configuration Directives 3:48 
    Short and ASP Style: Enabled/Disabled 4:13 
    phpinfo() 7:58 
   Statements 14:28 
    PHP Statements 14:29 
    Example: PHP Statements 14:55 
   Comments 16:53 
    PHP Comments 16:55 
    Single-line Comments 17:37 
    Multi-line Comments 18:13 
    Example: PHP Comments 18:47 
   Coding Conventions 24:26 
    Coding Conventions 24:27 
    Example: PHP Coding Conventions 26:19 
   Homework Challenge #1 33:51 
    Homework Challenge #1 33:52 
   Homework Challenge #1 (cont.) 35:41 
    Homework Challenge #1 (cont.) 35:42 
   Homework Challenge #2 36:09 
    Homework Challenge #2 36:10 
   Homework Challenge #2 (cont.) 38:07 
    Homework Challenge #2 (cont.) 38:08 
  Variables & Numeric Data Types 16:38
   Intro 0:00 
   Lesson Overview 0:10 
    Lesson Overview 0:12 
   Working With Data 0:48 
    8 Types of Data for PHP 0:49 
   Identifiers 1:40 
    Identifiers: Definition and Example 1:41 
   Variables 2:47 
    Variables Definition 2:48 
    Variables Syntax 3:06 
   Integer Data Type 4:44 
    Integer Data Type 4:45 
    Integer Literals 5:08 
    Examples 5:30 
   Float Data Type 6:26 
    Float Data Type 6:27 
    Float Literals 7:00 
    Example 7:21 
   Example: PHP Code Declaring Variables 8:06 
    Example: PHP Code Declaring Variables 8:07 
   var_dump() Function 9:59 
    var_dump() 10:00 
    Example: Code and Output 10:30 
    Example: var_dump() Function 11:19 
   Coding Conventions: Variables 12:32 
    Lower Camel Case Notation 12:33 
    Variable Name Lengths 13:54 
   Homework Challenge 14:54 
    Homework Challenge 14:55 
  String Data Type 18:06
   Intro 0:00 
   Lesson Overview 0:12 
    Lesson Overview 0:13 
   String Data Type 0:29 
    String Data Type 0:30 
    Specifying String Literals 1:03 
   Single-Quoted Strings 1:53 
    Single-Quoted Strings 1:54 
   Escape Sequences 2:31 
    Escape Sequences 2:32 
    Example 2:46 
    Escape Sequences for Commonly Used Special Characters 4:32 
   Double-Quoted Strings 6:04 
    Double-Quoted Strings 6:05 
    Variable Interpolation 6:44 
   Coding Conventions: Strings 7:54 
    Coding Conventions: Strings 7:55 
   Homework Challenge 8:54 
    Homework Challenge 8:55 
  Include Files & Web Application Introduction 38:43
   Intro 0:00 
   Lesson Overview 0:16 
    Lesson Overview 0:17 
   include Statement 0:47 
    include Statement: Definition 0:48 
    Include Statement: Syntax 2:05 
    include Statement: Example 2:25 
   include Path 6:32 
    Absolute and Relative Path 6:34 
    Specified Path 7:15 
    Not Specified Path 7:55 
   Code Reuse 9:35 
    Code Reuse 9:36 
    Example 11:11 
   require Statement 12:56 
    require Statement: Definition 12:57 
    require Statement: Syntax 13:32 
    Include versus Require 13:52 
   Coding Conventions 16:33 
    Coding Conventions 16:34 
   Introduction to Our Web Application 20:32 
    Introduction to Our Web Application 20:33 
    Updating Web Application 21:14 
    Web Application Example 22:59 
   Homework Challenge 35:33 
    Homework Challenge 35:34 
   Homework Challenge (cont.) 37:38 
    Homework Challenge (cont.) 37:39 
  Arrays 34:00
   Intro 0:00 
   Lesson Overview 0:09 
    Lesson Overview 0:10 
   What is an Array? 0:42 
    What is an Array? 0:43 
    Arrays in PHP 1:44 
    Keys and Values 2:15 
   Types of Arrays 3:37 
    Indexed Arrays & Associative Arrays 3:38 
   array() Construct 6:47 
    Declaring Arrays 6:48 
    Defining Indexed Array 7:00 
    Defining Associative Arrays 7:43 
   Square Bracket Syntax 8:50 
    Square Bracket Syntax 8:51 
    Accessing Indexed Arrays 9:02 
    Accessing Associative Arrays 9:56 
   Arrays Example 10:41 
    Indexed Arrays Example 10:45 
    Associative Arrays Example 13:55 
   Multi-Dimensional Arrays 18:28 
    Multi-Dimensional Arrays 18:29 
    Multi-Dimensional Arrays Example 18:51 
    Multi-Dimensional Arrays in PHP File 20:34 
   Coding Conventions: Arrays 27:59 
    Coding Conventions: Arrays 28:00 
   Homework Challenge #1 29:20 
    Homework Challenge #1 29:21 
   Homework Challenge #2 30:38 
    Homework Challenge #2 30:39 
  Web Application Development 27:38
   Intro 0:00 
   Versions 0:14 
    Version 3.0 1:23 
    Version 3.1 8:08 
    Version 3.2 11:42 
    Version 3.3 20:27 
   Homework Challenge 26:31 
    Homework Challenge 26:32 
  Script Input & The GET Method 30:18
   Intro 0:00 
   Lesson Overview 0:15 
    Lesson Overview 0:16 
   Providing Input to PHP 0:39 
    GET Method, POST Method, and Cookies 0:40 
    Name/Value Pairs 1:22 
   GET Method 1:57 
    HTTP GET Method 1:58 
    Query String 2:52 
   GET Method Example 3:38 
    GET Method Example 3:39 
   Review of HTML Forms 8:16 
    HTML Forms 8:17 
    Input Control and Submitted Form 9:13 
   <form> Tag 10:07 
    <form> Tag 10:08 
    Method 10:34 
    Action 11:13 
   Input Control Examples 11:50 
    Input Control Examples 11:51 
   Common Input Controls 17:31 
    Common Input Controls 17:32 
   Query Strings 18:52 
    Query Strings 18:53 
    Query Strings Syntax 19:12 
   URL Encoding 20:01 
    URL Syntax 20:02 
    Examples 21:17 
    Simple Form Example 22:28 
   urlencode() Function 24:08 
    urlencode() Function 24:09 
    Example 25:03 
   urlEncoding Text Example 25:54 
    Simple Form Example 25:55 
   Homework Challenge 28:46 
    Homework Challenge 28:47 
  Accessing Form Data in PHP 32:01
   Intro 0:00 
   Lesson Overview 0:17 
    Lesson Overview 0:18 
   $_GET Array 0:48 
    $_GET Array 0:49 
    Accessing the Value of a Name/Value Pair Submitted Via GET 1:04 
   Name Form Example 2:54 
    Name Form and the $_GET Array 2:55 
   Using Arrays with Input Controls 6:34 
    Using Arrays with Input Controls 6:35 
    Common Example 6:47 
   Indexed Array Form Example 8:16 
    Indexed Array Form Example 8:17 
   Associative Arrays with Input Controls 10:14 
    Associative Arrays with Input Controls 10:15 
   Associative Arrays Example 11:41 
    Associative Arrays Example 11:42 
   Echo Form Example 15:18 
    Echo Form Example 15:19 
   Outputting Arrays In String 23:42 
    Variable Interpolation 23:43 
    Outputting a Value in an Indexed Array Within a String 24:12 
    Simple' Syntax, 'Complex' Syntax, and 'Curly Brace' Syntax 25:00 
   Outputting Arrays In String Example 26:25 
    Outputting Arrays In String Example 26:26 
   Homework Challenge 29:39 
    Homework Challenge 29:40 
  Web Application Development 20:20
   Intro 0:00 
   Lesson Overview 0:19 
    Lesson Overview 0:20 
   Version 3.3 0:38 
    Version 3.3 0:42 
   Version 4.0 Changelog 2:43 
    GET Query 2:45 
    Adding, Editing, and Removing 3:24 
   Version 4.0 Coding Example 3:55 
    item.php, itemID, and itemListing 4:00 
   Version 4.1 Changelog 10:36 
    Version 4.1 Changelog 10:37 
   Version 4.1 Coding Example 11:45 
    Adding Checkout and Thank You & Editing Footer and Store 11:46 
   Homework Challenge 18:45 
    Homework Challenge 18:46 
  Expression & Operators 31:56
   Intro 0:00 
   Lesson Overview 0:10 
    Lesson Overview 0:11 
   Expressions 0:41 
    Expressions Definition 0:42 
    Example: Literals 0:55 
    Example: Variables 1:05 
   Operators 1:44 
    Operators Definition 1:45 
    Unary, Binary, and Ternary Operators 2:07 
   Assignment Operators 2:52 
    Assignment Operators 2:53 
    Array Assignment Operator 3:47 
   Arithmetic Operators 6:15 
    Operators for Common Arithmetic Operations 6:16 
    Modulus Operator 7:41 
    Arithmetic Operators Example 8:25 
   Increment/Decrement Operators 10:48 
    Increment/Decrement Operators 10:49 
    Pre- and Post- Increment/Decrement 12:43 
    Coding Example 15:14 
   Combined Assignment Operators 16:44 
    Combined Assignment Operators 16:45 
    Combined Assignment Operators Examples 18:23 
    Coding Example 19:39 
   String Operators 20:28 
    Concatenation Operator, String Variables, and String Literals 20:29 
    String Operators Example 22:41 
   Precedence & Associativity 23:40 
    Precedence & Associativity 23:41 
    Expression Containing Multiple Operations 23:58 
    Expression Containing Two Operations of Equal Precedence 25:55 
    Using Parentheses to Force Precedence 26:52 
    Precedence & Associativity Review 28:57 
   Homework Challenge 31:08 
    Homework Challenge 31:09 
  Web Application Development 20:51
   Intro 0:00 
   Lesson Overview 0:15 
    Lesson Overview 0:16 
   Version 4.1 Review 0:33 
    Version 4.1 Review 0:34 
   Version 5.0 Changelog 1:05 
    Version 5.0 Changelog 1:06 
   Version 5.0 Example 2:19 
    Adding View Cart & Editing Checkout, Footer and Store 2:20 
   Version 5.1 Changelog 15:36 
    Version 5.1 Changelog 15:37 
   Version 5.1 Coding Example 17:33 
    Forwarding Order Total to Thank You Page 17:34 
   Homework Challenge 20:09 
    Homework Challenge 20:10 
  Boolean & Null Data Types 20:11
   Intro 0:00 
   Lesson Overview 0:12 
    Lesson Overview 0:13 
   Boolean Data Type 0:38 
    Boolean Data Type 0:39 
    Two Boolean Literals 1:24 
   Boolean Example 1:50 
    Boolean Example 1:51 
   Comparison Operators 4:00 
    Comparison Operators Definition 4:01 
    Common Comparison Operators 4:40 
    Comparison Operators Example 6:49 
   Comparison Operators (Cont.) 10:10 
    Identical and Not Identical 10:11 
    Example: Identical and Not Identical 11:24 
   Null Data Type 13:36 
    Null Data Type Definition 13:37 
    Null Literal 14:08 
    Variable and Null Data Type 14:30 
    '==' Operator 15:24 
    Null Data Type Example 15:59 
   Coding Convention 18:41 
    Coding Convention 18:42 
   Homework Challenge 19:17 
    Homework Challenge 19:18 
  Type Casting 22:41
   Intro 0:00 
   Lesson Overview 0:12 
    Lesson Overview 0:13 
   Type Juggling 0:54 
    Type Juggling 0:55 
    Automatic Conversion 2:23 
   Type Casting 3:53 
    Type Casting 3:54 
    Implicit and Explicit Type Casting 4:00 
    Explicitly 'cast' a Variable Example 4:16 
   Type Casting (cont.) 6:48 
    PHP Allows the Following Explicit Type Casts 6:49 
    The settype () Function 8:18 
   Type Casting Coding Example 9:00 
    Explicit Type Casts 9:01 
   String Conversions 14:52 
    String Conversions 15:05 
    Common Conversions to String 15:55 
   Numeric Conversions 18:18 
    Numeric Conversions 18:19 
   Boolean Conversions 20:29 
    Boolean Conversions 20:30 
   Homework Challenge 21:38 
    Homework Challenge 21:39 
  Introduction to Functions 52:20
   Intro 0:00 
   Lesson Overview 0:10 
    Lesson Overview 0:11 
   What are Functions? 0:51 
    Definition of Faction 0:52 
    PHP and Function Call 1:53 
   Function Calls 2:42 
    Function Calls 2:43 
    Function Arguments 3:17 
   Return Values 4:56 
    Return Values 4:57 
   Function Chaining 6:29 
    Function Chaining 6:30 Function Reference 8:23 & Function Prototypes 8:24 Function Reference Example 9:29 
   Optional Function Arguments 12:28 
    Optional Function Arguments 12:29 
   String Functions 14:57 
    strtoupper() and strtolower() 14:58 
    implode (), str_replace(), explode(), strpos(), substr(), and strlen() 18:31 
   Array Functions 25:48 
    count() 25:49 
    in_array() and array_key_exists() 26:06 
    sort() and ksort() 26:37 
    Example: count() and in_array() 27:50 
    Example: array_key_exists() 29:53 
    Example: sort() and ksort() 31:20 
   Date & Time Functions 33:38 
    date() and time() 33:39 
    getdate() 34:49 
    mktime() 35:01 
    Date & Time Functions 35:12 
    Example: date() and time() 35:58 
    Example: getdate() 42:15 
    Example: mktime() 43:15 
   Homework Challenge #1 44:31 
    Homework Challenge #1 44:32 
   Homework Challenge #1 (Cont.) 45:28 
    Homework Challenge #1 (Cont.) 45:29 
   Homework Challenge #2 46:34 
    Homework Challenge #2 46:34 
   Homework Challenge #2 (Cont.) 48:06 
    Homework Challenge #2 (Cont.) 48:07 
   Homework Challenge #2 (Cont.) 49:17 
    Homework Challenge #2 (Cont.) 49:18 
   Homework Challenge #3 50:08 
    Homework Challenge #3 50:09 
  Constants 19:24
   Intro 0:00 
   Lesson Overview 0:09 
    Lesson Overview 0:10 
   Constants vs. Variables 0:55 
    Constants vs. Variables 0:56 
   Constant Identifiers 2:28 
    Constant Identifiers Definition and Examples 2:29 
   Declaring Constants 3:47 
    Two Ways of Declaring Constants 3:48 
    Syntaxes 4:10 
    Major Difference in the Two Forms 4:48 
   Using Constants Example 6:25 
    Using Constants Example 6:26 
   Coding Conventions 11:08 
    Constant Names 11:09 
    define () Function 11:42 
    Meaningful Names 12:00 
   $_SERVER Superglobal 12:23 
    $_SERVER 12:24 
    $_SERVER ['DOCUMENT_ROOT'] 13:15 
    $_SERVER Superglobal Example 13:52 
   Homework Challenge 17:40 
    Homework Challenge 17:41 
  Web Application Development 26:29
   Intro 0:00 
   Lesson Overview 0:13 
    Lesson Overview 0:14 
   Version 6.0 1:13 
    Version 6.0 & Version 5.1 Review 1:14 
   Version 6.0 Changelog 11:24 
    Version 6.0 Changelog 11:25 
   Version 6.1 Changelog 12:00 
    Version 6.1 Changelog 12:01 
   Version 6.1 Coding Example 12:42 
    Version 6.1 Coding Example 12:43 
   Version 6.2 Changelog 15:18 
    Version 6.2 Changelog 15:19 
   Version 6.2 Coding Example 18:19 
    Version 6.2 Coding Example 18:20 
   Homework Challenge 25:24 
    Homework Challenge 25:25 
  Conditional Control Structures 18:58
   Intro 0:00 
   Lesson Overview 0:26 
    Lesson Overview 0:27 
   Statement Groups 0:57 
    Statement Groups 0:58 
    Example 1:10 
   Conditional Control Structures 1:38 
    Conditional Control Structures 1:39 
    PHP Control Structures 1:56 
   if Statement 2:32 
    if Statement 2:33 
   if Statement (cont.) 3:49 
    if Statement Coding Example 3:50 
   else Statement 7:26 
    else Statement 7:27 
    if/else Statement Coding Example 8:50 
   isset() Construct 9:59 
    isset() Construct 10:00 
    isset() Construct Coding Example 12:00 
   Coding Conventions 15:13 
    Coding Conventions 15:14 
   Coding Conventions (Cont.) 16:39 
    Coding Conventions (Cont.) 16:40 
   Homework Challenge 17:25 
    Homework Challenge 17:26 
  Error Handling 19:08
   Intro 0:00 
   Lesson Overview 0:09 
    Lesson Overview 0:10 
   Error Handling in PHP 0:41 
    Error Handling in PHP 0:42 
    Coding Example 1:45 
   error_reporting() Function 7:02 
    error_reporting() Function 7:03 
    Coding Example 8:04 
   Additional Error Directives 9:02 
    display_errors 9:13 
    log_errors 9:37 
    error_log 9:50 
    track_errors 10:12 
    Coding Examples 10:29 
   Error Control Operator 13:38 
    Error Control Operator & Coding Example 13:39 
   Homework Challenge 16:19 
    Homework Challenge 16:20 
   Homework Challenge (cont.) 17:58 
    Homework Challenge (cont.) 17:59 
  Logical & Ternary Operators 23:22
   Intro 0:00 
   Lesson Overview 0:17 
    Lesson Overview 0:18 
   Logical Operators 0:49 
    Logical Operators Definition 0:50 
    NOT (!) 1:08 
    OR ( ||, or) 1:35 
    AND (&&, and) 2:08 
    XOR (xor) 2:30 
   Logical Operators (cont.) 2:54 
    The OR and AND Logical Operators 2:55 
    Precedence of Logical Operators 3:35 
   Logical Operators Coding Example 3:58 
    Logical Operators Coding Example 3:59 
   Short-Circuit Operators 9:54 
    Short-Circuit Operators 9:55 
    Coding Example 10:49 
   Ternary Operator 14:07 
    Ternary Operator 14:08 
    Syntax and Example 14:24 
   Coding Conventions 17:36 
    Coding Conventions 17:37 
   Homework Challenge 19:08 
    Homework Challenge 19:09 
   Homework Challenge (cont.) 20:26 
    Homework Challenge (cont.) 20:27 
  Web Application Development 19:27
   Intro 0:00 
   Lesson Overview 0:12 
    Lesson Overview 0:13 
   Version 6.2 Review 0:26 
    Version 6.2 Review 0:27 
   Version 7.0 Changelog 2:39 
    Version 7.0 Changelog 2:40 
   Version 7.0 Coding Example 4:35 
    Version 7.0 Coding Example 4:36 
   Version 7.1 Changelog 12:43 
    Version 7.1 Changelog 12:44 
   Version 7.1 Coding Example 13:52 
    Version 7.1 Coding Example 13:53 
   Homework Challenge 17:42 
    Homework Challenge 17:43 
  More Conditional Control Structure 20:49
   Intro 0:00 
   Lesson Overview 0:13 
    Lesson Overview 0:14 
   elseif Statement 0:45 
    elseif Statement 0:46 
    elseif Statement Coding Example 1:22 
   Multiple elseif Statements 2:16 
    Multiple elseif Statements 2:17 
    Multiple elseif Statements Coding Example 3:07 
   Adding an else Statement 5:44 
    Adding an else Statement Overview 5:45 
    Adding an else Statement Coding Example 6:50 
   switch() Statement 8:07 
    switch() Statement 8:08 
   switch() Statement (Cont.) 9:14 
    switch() Statement (Cont.) 9:15 
    switch() Statement Coding Example 11:09 
   default Case 14:20 
    default Case 14:21 
    default Case Coding Example 15:13 
   Coding Conventions 15:57 
    Coding Conventions 15:58 
   Coding Conventions (cont.) 17:10 
    Coding Conventions (cont.) 17:11 
   Homework Challenge 18:06 
    Homework Challenge 18:07 
   Homework Challenge (cont.) 19:18 
    Homework Challenge (cont.) 19:19 
  Nested Conditional Control Structures 24:49
   Intro 0:00 
   Lesson Overview 0:10 
    Lesson Overview 0:11 
   Nested Control Structures 0:36 
    Nested Control Structures 0:37 
    Nested Control Structures Coding Example 2:08 
   Coding Conventions 6:34 
    Nested vs. Not Nested Control Structures 6:35 
   Debugging Control Structures 7:51 
    Debugging Control Structures 7:52 
    Incorrectly Specified Test Conditions and Forgetting a Break Statement 8:32 
    Incorrectly Placing an Opening or Closing Curly Brace 12:14 
   Debugging Tips 16:24 
    Tracing the Execution of Your Code 16:25 
    Adding Echo Statement 17:15 
   Homework Challenge 21:41 
    Homework Challenge 21:42 
   Homework Challenge (cont.) 23:08 
    Homework Challenge (cont.) 23:09 
  Web Application Development 28:20
   Intro 0:00 
   Lesson Overview 0:13 
    Lesson Overview 0:14 
   Version 7.1 Review 0:46 
    Version 7.1 Review 0:47 
   empty () Construct 1:38 
    empty () Construct 1:39 
    empty () Construct Coding Example 2:37 
   Version 8.0 5:32 
    Version 8.0 Overview 5:33 
   Version 8.0 Coding Example 7:08 
    Version 8.0 Coding Example 7:09 
   Version 8.1 16:13 
    Version 8.1 Overview 16:14 
   Version 8.1 Coding Example 19:48 
    Version 8.1 Coding Example 19:49 
   Homework Challenge 26:19 
    Homework Challenge 26:20 
  Sending Email Using PHP 43:50
   Intro 0:00 
   Lesson Overview 0:14 
    Lesson Overview 0:15 
   Built-in Mail Extension 1:28 
    Built-in Mail Extension 1:29 
   SMTP Overview 2:04 
    SMTP Overview 2:05 
   SMTP - Windows 3:08 
    SMTP - Windows 3:09 
   SMTP - Linux/UNIX 4:58 
    SMTP - Linux/UNIX 4:59 
   Mail Configuration Directives 6:35 
    Mail Configuration Directives 6:36 
    Coding Example 7:48 
   Mail Server Authentication 10:20 
    Mail Server Authentication 10:21 
   fake sendmail Program 12:27 
    fake sendmail for Windows 12:28 
    Main 'add-on' feature 13:03 
    Username & Password 13:25 
   SMTP - XAMPP for Windows 14:07 
    SMTP - XAMPP for Windows 14:08 
   Sendmail Example 16:19 
    Sendmail Example 16:20 
   mail() Function 18:39 
    mail() Function 18:40 
    additional_headers 19:45 
    'From' Header 20:12 
   mail() Function Coding Example 21:09 
    mail() Function Coding Example 21:40 
   Web Application Development 31:43 
    Version 9.0 Changelog 31:44 
   ContactUs.php 32:52 
    ContactUs.php 32:53 
    contactInfo 33:45 
   Version 9.0 Coding Example 34:31 
    Version 9.0 Coding Example 34:32 
   Homework Challenge 41:32 
    Homework Challenge 41:33 
  User-Defined Functions 56:00
   Intro 0:00 
   Lesson Overview 0:16 
    Lesson Overview 0:17 
   Defining Functions 1:29 
    Four Parts of Defining a Function 1:30 
    Functions Example 1 2:29 
   Function Parameters 5:29 
    Function Parameters 5:30 
    Functions Example 2 8:20 
   Return Statements 12:53 
    Return Statements 12:54 
    Functions Example 3 14:20 
   Where to Define Functions 20:34 
    Where to Define Functions 20:35 
   include_once Construct 22:10 
    include_once Construct 22:11 
    include_once Coding Example 23:55 
   Reasons to Use Functions 27:44 
    Take Advantage of Code Reuse 27:45 
    Improve Code Readability 29:56 
    Use Instead of 'content' Include Files 32:12 
   Web Application Development 34:42 
    Version 10.0 Changelog 34:43 
   Version 10.0 Coding Example 37:55 
    Version 10.0 Coding Example 37:56 
   Outputting HTML in Functions 47:04 
    Outputting HTML in Functions 47:05 
    Example 49:02 
   Coding Conventions 53:16 
    Coding Conventions 53:17 
   Homework Challenge 54:33 
    Homework Challenge 54:34 
  Variable Scope 31:37
   Intro 0:00 
   Lesson Overview 0:09 
    Lesson Overview 0:10 
   What is Variable Scope? 0:57 
    Variable Scope 0:58 
    Global Scope 1:15 
    Local Function Scope 1:50 
   Variable Scope Coding Example 2:26 
    Variable Scope Coding Example 2:27 
   global Keyword 8:52 
    global Keyword Overview 8:53 
    global Keyword Example 9:25 
   Superglobals 12:34 
    Superglobals 12:35 
    Superglobals Example 14:53 
   Pitfalls of Global Variables 18:34 
    Pitfalls of Global Variables 18:35 
   When to Define Variables 22:09 
    When to Define Variables 22:10 
   Putting It All Together 22:56 
    Putting It All Together Example 22:57 
   Function Scope 28:56 
    Function Scope 28:57 
   Homework Challenge 29:41 
    Homework Challenge 29:42 
   Homework Challenge (cont.) 30:59 
    Homework Challenge (cont.) 31:00 
  Web Application Development 28:27
   Intro 0:00 
   Lesson Overview 0:12 
    Lesson Overview 0:13 
   Version 11.0 Changelog 0:56 
    Version 11.0 Changelog 0:57 
   processGetVar() 1:42 
    processGetVar() Overview 1:43 
    processGetVar() Example 2:25 
   emailComments() 6:35 
    emailComments() Overview 6:36 
    emailComments() Example 7:14 
   outputItemLink() 11:19 
    outputItemLink() Overview 11:20 
    outputItemLink() Example 11:45 
   calcCartTotal() 19:25 
    calcCartTotal() Overview 19:26 
    calcCartTotal() Example 21:14 
   Homework Challenge 25:56 
    Homework Challenge 25:57 
  Optional Parameters 19:35
   Intro 0:00 
   Lesson Overview 0:10 
    Lesson Overview 0:11 
   Optional Parameters 0:26 
    Optional Parameters Definition 0:27 
    Default Values 0:53 
    Optional Parameters Coding Example 3:26 
   More on Optional Parameters 6:55 
    Multiple Optional Parameters 6:56 
    Coding Example 8:05 
   Homework Challenge 16:18 
    Homework Challenge 16:19 
  Web Application Development 23:07
   Intro 0:00 
   Lesson Overview 0:13 
    Lesson Overview 0:14 
   Version 12.0 Changelog 0:55 
    Version 12.0 Changelog 0:56 
   Update to outputLink() 1:44 
    Update to outputLink() 1:45 
    outputLink() Coding Example 2:40 
   outputImg() 13:57 
    outputImg() Overview 13:58 
    outputImg() Coding Example 15:35 
   Homework Challenge 22:05 
    Homework Challenge 22:06 
  Introduction to Conditional Loops 57:20
   Intro 0:00 
   Lesson Overview 0:08 
    Lesson Overview 0:09 
   while Loop 0:48 
    Definition 0:49 
    Syntax and Usage 1:12 
    Coding Example 3:33 
   Looping Over Arrays 13:16 
    Looping Over Arrays 13:17 
    Coding Example 13:53 
   Looping Over Arrays (cont.) 16:43 
    Internal Array Pointer 16:44 
   Array Traversal Functions 17:29 
    current () 17:30 
    next () and prev () 18:16 
    reset () and end () 19:25 
    key () 19:40 
   Indexed Arrays: Using current () and next () 20:40 
    Indexed Arrays: Using current () and next () 20:41 
   Associative Arrays: Using key (), current (), and next () 24:06 
    Associative Arrays: Using key (), current (), and next () 24:07 
   Array Traversal Functions (cont.) 29:41 
    list () Construct and Example 30:07 
    each () Construct and Example 34:40 
   Lopping Over Arrays Using list(), each() 42:13 
    Lopping Over Arrays Using list(), each() 42:14 
   Control Structure Scope 50:37 
    Definition and Example 50:38 
    Control Structure Scope Coding Example 51:59 
   Coding Conventions 54:20 
    Coding Conventions 54:21 
   Homework Challenge 54:58 
    Homework Challenge 54:49 
  More on Conditional Loops 35:50
   Intro 0:00 
   Lesson Overview 0:08 
    Lesson Overview 0:09 
   do-while Loop 0:42 
    do-while Loop 0:43 
    Simple do-while Loop Example 1:51 
    Another do-while Loop Example 4:09 
   continue Statement 10:46 
    continue Statement 10:47 
    For Example 11:07 
    continue Statement Coding Example 12:44 
   break Statement Re-Visited 18:10 
    break Statement Re-Visited 18:11 
    break Statement In while Loops Example 19:38 
   Infinite Loops 23:26 
    Infinite Loops 23:27 
    Coding Example 24:57 
   Common Loop Pitfalls 25:59 
    Counter Initialization Occurs in Loop 26:30 
    Counter Not Incremented in Loop 29:30 
    Unreachable Break Statement 30:50 
   Coding Conventions 33:48 
    Do-while Statements Coding Conventions 33:49 
   Homework Challenge 34:28 
    Homework Challenge 34:29 
  Web Application Development 22:07
   Intro 0:00 
   Lesson Overview 0:10 
    Lesson Overview 0:11 
   Version 13.0 Changelog 0:48 
    Updating 'viewCart.php' and calcCartTotal() 0:49 
    Creating isValidCart() 9:22 
    Adding Three New Item to the Store & Links 15:56 
   Version 13.1 Changelog 17:20 
    Updating outputItemLink() to Remove Its Global Dependency on $itemCatalog 17:21 
   Homework Challenge 20:34 
    Homework Challenge 20:35 
  For & Foreach Loops 29:28
   Intro 0:00 
   Lesson Overview 0:11 
    Lesson Overview 0:12 
   for Loops 0:45 
    for Loops 0:46 
    Expression 1 1:22 
    Expression 2 1:47 
    Expression 3 2:01 
   Simple Example 2:27 
    Simple Example 2:28 
   Notes on for Loops 8:56 
    Notes on for Loops 8:57 
   Ending Loop Using Test Condition and Break Statement 10:06 
    Ending Loop Using Test Condition and Break Statement 10:07 
   foreach Loops 12:03 
    foreach Loops 12:04 
   Indexed Array Syntax 14:10 
    Syntax 14:11 
    Example 15:23 
   Associative Array Syntax 18:31 
    Syntax 18:32 
    Example 19:47 
   Coding Conventions 25:05 
    for Loops 25:06 
    foreach Loops 25:58 
   Homework Challenge 26:52 
    Homework Challenge 26:53 
  Web Application Development 25:58
   Intro 0:00 
   Lesson Overview 0:12 
    Lesson Overview 0:13 
   Version 14.0 Changelog 1:19 
    Version 14.0 Changelog 1:20 
   Version 14.0 Coding Example 1:57 
    Version 14.0 Coding Example 1:59 
   Version 14.1 Changelog 5:39 
    Version 14.1 Changelog 5:40 
   Version 14.1 Coding Example 7:06 
    Version 14.1 Coding Example 7:07 
   Version 14.2 Changelog 15:37 
    Version 14.2 Changelog 15:38 
   Version 14.2 Coding Example 16:25 
    Version 14.2 Coding Example 16:26 
   Homework Challenge 23:35 
    Homework Challenge 23:36 
  Conditional Loop Wrap-Up 23:12
   Intro 0:00 
   Lesson Overview 0:09 
    Lesson Overview 0:10 
   Nested Conditional Loops 0:39 
    Nested Conditional Loops 0:40 
    Coding Example 1:10 
   continue & break Re-Visited 5:17 
    Continue Statements and Coding Example 5:30 
    Break Statements and Coding Example 11:34 
   Loop Debugging Tips 15:16 
    Add Short Debug Statement At the Very Beginning 15:17 
    Output a Counter Variable 18:10 
    Add Debug Statement At the Very End 19:20 
   Homework Challenge 20:20 
    Homework Challenge 20:21 
   Homework Challenge (cont.) 22:00 
    Homework Challenge (cont.) 22:01 
  Variable-Length Parameter Lists 22:16
   Intro 0:00 
   Lesson Overview 0:09 
    Lesson Overview 0:10 
   Variable-Length Parameter Lists 0:34 
    Variable-Length Parameter Lists 0:35 
    Coding Example 1:51 
   Variable-Length Parameter Lists (cont.) 5:21 
    When a Parameter List is Defined For the Functions 5:22 
    Coding Example 6:32 
   Variable Type Functions 9:54 
    is_int (), is_float (), is_string (), and is_bool() 9:55 
    is_ array () 10:50 
    is_null () 11:01 
    Variable Type Functions Coding Example 1 11:27 
    is_numeric() and Example 15:57 
    Variable Type Functions Coding Example 2 17:12 
   Homework Challenge 19:35 
    Homework Challenge 19:36 
   Homework Challenge (cont.) 20:52 
    Homework Challenge (cont.) 20:53 
  Web Application Development 38:36
   Intro 0:00 
   Lesson Overview 0:10 
    Lesson Overview 0:11 
   Version 15.0 Changelog 0:33 
    outputLink (), outputImg (), is_array () and is_string () 0:34 
   Version 15.0 Coding Example 1:31 
    Version 15.0 Coding Example 1:32 
   Version 15.1 Changelog 7:55 
    Removing Redundant Code and Adding New Function Called outputHtmlTag () 7:56 
   Version 15.1 Coding Example 8:37 
    Version 15.1 Coding Example 8:38 
   Version 16.0 Changelog 14:55 
    Creating emailOrder() Using New Constants ORDER_EMAIL_FROM and ORDER_EMAIL_SUBJECT 14:56 
   Version 16.0 Coding Example 16:30 
    Version 16.0 Coding Example 16:31 
   Version 16.1 Changelog 32:21 
    Creating formatAsDollars () 32:22 
   Version 16.1 Coding Example 32:57 
    Version 16.1 Coding Example 32:58 
   Homework Challenge 36:27 
    Homework Challenge 36:28 
  Miscellaneous Topics 31:49
   Intro 0:00 
   Lesson Overview 0:10 
    Lesson Overview 0:11 
   register_globals Directive 0:58 
    register_globals 0:59 
    Coding Example 2:04 
   $_GET vs. $HTTP_GET_VARS 4:07 
    $_GET vs. $HTTP_GET_VARS 4:08 
    register_long_arrays Directive Coding Example 5:44 
   Magic Constants 7:30 
    Magic Constants 7:31 
    __LINE__, __FILE__, __FIR__, and __FUNCTION__ 8:16 
    Coding Example 9:06 
   exist() & die() 13:19 
    exist() & die() 13:20 
    Coding Example 14:08 
   Execution Operator 16:23 
    Execution Operator 16:24 
    Coding Example 17:27 
   Array Operators 18:23 
    Equality (==) and Inequality (!=, <>) 18:43 
    Identity (===) and Non-Identity (!==) 19:13 
    Union (+) Operator 19:41 
    Array Operators Coding Example 20:07 
   Variable Variables 24:13 
    Variable Variables 24:14 
    Coding Example 26:07 
   Variable Functions 28:02 
    Variable Functions 28:03 
    Coding Example 29:13