A simple PHP tutorial

Here we would like to show the very basics of PHP in a short, simple tutorial. This text only deals with dynamic webpage creation with PHP, though PHP is not only capable of creating webpages. See the section titled What can PHP do for more information.

PHP-enabled web pages are treated just like regular HTML pages and you can create and edit them the same way you normally create regular HTML pages.

What do I need?

In this tutorial we assume that your website hosting server has activated support for PHP, and that all files ending in .php are handled by PHP. On most servers, this is the default extension for PHP files, but ask your server administrator to be sure. If your server supports PHP, then you do not need to do anything. Just create your .php files, put them in your web directory and the server will automatically parse them for you. There is no need to compile anything nor do you need to install any extra tools. Think of these PHP-enabled files as simple HTML files with a whole new family of magical tags that let you do all sorts of things. 

You can find a list of PHP books at the UK Trading online bookshop.


Your own PHP development server?

If you want to save precious bandwidth and develop your PHP files locally. then you will need to install a web server, such as Apache, and PHP on your PC. You will most likely want to install a database as well, such as MySQL

You can either install these individually or choose a simpler way. Locate a pre-configured package which automatically installs all of these with just a few mouse clicks. It often sounds complex to the novice, but it is quite easy to setup a web server with PHP support on any operating system, including Linux and Windows. 

On Linux, you may find rpmfind and PBone helpful for locating RPMs. You may also want to visit apt-get to find packages for Debian.

 

 

osCommerce Website Hosting - Your complete online shopping cart system