TT Web Site Manager Tutorial
A quick demonstration of PHP items

This tutorial builds upon the previous tutorial, Creating a static HTML page, and it uses the site and page created in that tutorial as its example.

If you have followed the earlier parts of this tutorial you will know how to create an item container and items. Create an item container called "PHP items" and create a new item in it. In the item manager script, fill in the form for your new item as shown below and click the "Save" button. This item is a simple PHP script that sets the value of some variables.

Now create another item as shown below. This item counts from $start to $end, returning each number to the browser as it counts.

Go to the page contents script for the home page. Add the two items to the home page in the order that you created them.

Before you can continue, you must move each new component to the right place in the page by adjusting the sort orders. The variable definition item stays at the top, but the count from $start to $end item needs to go in down in the body of the page after the "Hello World" item. Type the number 25 in the sort order box and click the "Move" button. This returns a screen like the one below, you may then click on the "Renumber" button to re order them in multiples of ten.

Click on the link at the top of the page to test it. The result is shown below, the build script has run the pieces of PHP and HTML code in the order in which they were aranged in the page contents script and returned the "Hello World" string and a sequence of numbers from 5 to 15.

Tutorial index