Blake O'Hare .com

PHP Tutorial Part 1 - Overview

Welcome to the world of PHP. This tutorial is written for users new to programming in general. Although if you already know how to program and are just looking for a quick PHP run-through, you can probably skip and skim portions of this tutorial and get some compact useful information out of it. Even though this is a beginner's tutorial, if you do not already know HTML, you should probably go somewhere and learn that first.

What is PHP?

PHP was invented by Rasmus Lerdorf who used the language for his "Personal Home Page" but as the language became public and popular, this acronym no longer made sense. So now the official acronym for PHP is "PHP: Hypertext Preprocessor". Yes, it's a recursive acronym. Like GNU.

PHP is what is known as a server-side scripting language, which means the PHP code runs on the server and generates resultant HTML code that is then sent to the user viewing the web page. This allows the programmer to create dynamic web pages that change content, such as message boards or wikis.

php_diagram.png

One of the benefits you get from server-side scripting is that it is impossible for users to see your code. They will only see the resultant HTML generated by your PHP script.

The other benefit of server-side scripting is the server can more freely and semi-securely communicate with other data sources such as a database. In fact, whenever PHP is used, MySQL is almost always used in conjunction. If you go to the bookstore and look for a PHP book, you'll notice many of the books are for PHP & MySQL

What This Tutorial Covers


This tutorial will cover basic topics on programming in PHP. Here is a list of topics that will be covered. I may add more at a later time.

This is more or less a crash course for someone entirely new to programming. These topics will be covered sufficiently such that you can use them and be dangerous. But there are nuances and shortcuts in PHP that are not covered. These can possibly be found elsewhere in the PHP Section

Getting a server set up is out of the scope of this tutorial. There are several ways to get access to a PHP-enabled server. You can either set one up yourself, or get someone to set one up for you, or buy PHP hosting, or, if you're lucky find free reliable PHP hosting. Either way, if you read on, I'm assuming you're good to go and ready to upload and execute PHP files.

Next: Input & Output