In Chapter 1, we talked about what dynamic content and dynamic sites are, and saw some examples. Now that we've established some structure for our site, and looked at the ways we handle navigation between the different parts, we can move on to look in more detail at how we go about creating dynamic content.
In order to match our description of what dynamic content is, we really only have to create a page that is different each time it is viewed. OK, so this is a neat trick, and can provide a more exciting site than one using only static HTML pages. However, it rather sidesteps the issue. One of the basic reasons for using dynamic content is to make our job as site administrator easier. We want to be able to make changes to the files (or to a database) that define the structure of the site and/or its pages, and have these changes automatically propagated through the pages our visitors see.
There are many ways of creating dynamic pages and sites, as we showed in the examples in Chapter 1. In those examples we used a database to store the content and structure information, but there are other ways to do it. In this chapter we'll look at the most popular ways. You'll see:
We'll start with a look at the different ways that we can create dynamic content. You'll find the samples for this chapter on our Web site at http://webdev.wrox.co.uk/books/1797/