 | Level: Introductory Tyler Anderson (tyleranderson5@yahoo.com), Freelance Writer, Backstop Media Nicholas Chase (ibm@nicholaschase.com), Freelance Writer, Backstop Media
14 Jun 2005 This tutorial is the first of a three-part "Learning PHP" series that takes you from the most basic PHP script to working with databases and streaming from the file system by documenting the building of a document workflow system. In this part, we look at the basics of building a PHP script, including syntax, HTML forms, and database connections.
Prerequisites
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.
System requirements
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. You can download Apache from Apache.org. If you're on Windows, you also have the option of using Internet Information Services, which is part of Windows.
-
PHP -- You will also 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.) You can download PHP from PHP.net.
-
Database -- Part of this project involves saving data to a database, so you'll need one of those, as well. We'll concentrate on MySQL because it's so commonly used with PHP. You can download MySQL from MySQL.com.
Formats html, pdf
|  | |  |