Navigation




PHP/MySQL

HTML, CSS, and JavaScript control what users see in their browsers. However, HTML pages can't remember much about users from session to session. When you log in to Moodle, how does the browser know which courses you are taking? When you add a comment to a blog (using an HTML form), how do other people's browsers get access to your text?

All of this happens on the server side. That's what this part of the site is about: how servers can store and retrieve information, and how they tell browsers what data to show.

The course is organized as a number of lessons. Each lesson has some goals. Each lesson has one or more mastery exercises. If you can do those by yourself, you've learned the main points of each lesson.

Some lessons have multiple topics. Each one will have goals, readings, and exercises.

In this class, expect to do less reading than other classes, but more time at the keyboard doing things. This is a doing class. You should spend 6 hours per week reading and working on exercises, in addition to class time. If study is not a priority in your life, find another class to take.

You need an account on a Web server that gives you PHP and MySQL. OU does not provide this. However, I have arranged for you to get deep discounts on Web space with a hosting company. See the class's Moodle page for more information.

 

Here's show the course is organized. First, we'll look at the architecture of Web applications. You'll get some PHP programs running on a Web server.

Next, we'll see how you can create a simple PHP-based site on a Web server. Mostly HTML, with a little bit of PHP to spice things up.

We'll look at how to get input from user forms, do some basic processing with it, and generate some output. You'll write a new basic PHP programs that change what they do based on what the user does.

We'll continue that theme by writing more programs that make decisions. We'll see how you can use functions to make code easier to write and understand. You'll create a simple login system here.

Next, we'll look at how you start binding pages together to create entire applications, that remember things from page to page. You'll use your login system to protect an entire set of pages.

We'll talk more about that next. We'll see how you use variables to track data about users. You'll see how loops are used.

Next we'll talk about how you can create template-based sites. This is one of the most common uses of PHP in industry. Template-based sites are much easier to maintain than static sites.

We'll start on databases next. The first topic is creating a MySQL database, connecting to it with PHP, and extracting some data.

Then we'll see how to use arrays and loops to process data extracted from a database. You'll write some programs that generate reports from databases.

The next topic is how to change data in a database. You'll write an application that let's people add, delete, and change data.