Author Archives: Steve

PHP and why you should use it

PHP is a programming language that is arguably one of the easiest to learn, cost efficient and common languages out there. It is used primarily to create dynamic website content. By dynamic I mean that it flows and it can change in a way that static website content can not.

With so much time invested by individuals and businesses in establishing themselves with a programming language, bias is inevitable, and you don’t have to dig deep to find someone criticising PHP. But then, the same goes for any language. Each has their own advantages and disadvantages.

What remains a fact is that PHP has been popular in the past, is popular now, and will continue to be popular well into the future.

Some of PHP’s advantages include:

  • Considered easy to learn as far as programming languages go, meaning it is very well known in the web development community
  • Hosting is more common and cheaper than for any other language
  • Large range of turnkey php applications available, some free, some not. Examples include WordPress, (the software this forum is running on), phpBB and wikipedia.
  • Abundance of free online resources

Here is a classic usage for PHP;
Situation - A shop owner wishes to supplement their traditional shop with an online shop, in the form of a 500 product website.
Solution A: Build a static website, and make 500 separate pages to accommodate each and every product.
Solution B: Build a dynamic website, create 1 product page and create 500 database entries

So what is the difference? In any case, the shop owner / web developer is going to have to process 500 products. Sure this sucks, at least initially.

PHP starts flexing its muscle when we get to the ongoing management side of things. The shopowner has decided that the … Read more

Posted in PHP | Leave a comment

PHP Server Side Includes

One of php‘s most practical solutions is a server side include.

Consider the navigation at the top of every page on this website. At time of writing there is 7 unique pages on thomasmultimedia.com.au, excluding this blog. If I were to add a new page to my site, would I not have to update each and every page to show the new link?

What a horrible sounding job — what if I had to make 2 or 3 changes to each and every one of those pages? In the context of 7 pages this might take say 10-15 minutes to open, change, save and upload 7 files. But what about if I have 20, 50, or 1000 different pages? This could take a day, if not a week!

What a horrible way to spend a week… and yet i’m sure someone, somewhere, in a deep, dark dungeon has slaved away at this menial task for hours on end.

All bow to King server side include!

A Server Side Include is a fairly ordinary file that is created for a website. It can contain any kind of web friendly content, but the most common usage is to display the same things over and over on different pages. So utilising this fantastic technology I have 1 file that contains my main navigation. If I want to rename, add, delete… or make any change under the sun, a server side include is my friend. I change the file once, and like magic every instance of the file is now reflecting the changes. Cool huh?

For any web people who have just read this post, don’t worry, I won’t leave you in the dark about how to do it – my favourite method is php.

For Dreamweaver users, use brackets – … Read more

Posted in PHP | 3 Comments