Before you start
This tutorial walks you through building a simple workflow application with PHP. Users will register for an account, upload files for approval, and view and download files that have already been approved. Users designated as administrators can view uploaded files and approve them to make the files available to all users. Part 2 and Part 3 of this series explore HTTP password protection and other relevant issues.
This tutorial covers the following:
- Creating a basic page
- Variables, loops, and if-then statements
- Functions
- Connecting to a database
- Using include files
- Tools
Who should take this tutorial?
If you're a programmer who wants to learn how to use PHP to build Web-based applications, start here with Part 1 of a three-part series of tutorials. PHP is a script-based language that is easy to learn, but still enables you to build complex applications with robust functionality. This tutorial walks you through creating a basic PHP page using HTML forms and also covers accessing databases.
This tutorial assumes you have no PHP experience. In fact, while it's useful for you to be familiar with the concepts of HTML, no other programming is necessary for this tutorial.
You need to have a Web server, PHP, and a database installed and available. If you have a hosting account, you can use it as long as the server has PHP V5 installed and has access to a MySQL database. Otherwise, download and install the following packages:
- Web server
- Whether you're on Windows or Linux (or Mac OS X, for that matter), you have the option of using the Apache Web server. Feel free to choose either V1.3 or 2.0, but the instructions in this tutorial concentrate on V2.0. If you're on Windows, you also have the option of using Internet Information Services, which is part of Windows.
- PHP V5
- You will need a distribution of PHP. Both PHP V4 and V5 are in use at the time of this writing, but because of changes in V5, we'll concentrate on that version. (The version isn't terribly important in this tutorial, but it makes a difference for later parts of this series.)
- MySQL
- Part of this project involves saving data to a database, so you'll need one of those, as well. In this tutorial, we'll concentrate on MySQL because it's so commonly used with PHP.

