Tuesday, August 17th, 2010

htmlentities and htmlspecialchars

These two PHP functions are very similar in what they do. They are also ones that many PHP newbies misuse by running them earlier in their processing than is appropriate. These functions are ones you want to run last when creating HTML. htmlentities and htmlspecialchars

Monday, August 16th, 2010

Sanitising Data

PHP now has a filtering option as a part of the language. Two of the things that the filter can do is to validate common data types or alternatively to sanitise the data. Sanitising data allows you to strip out totally invalid characters from a field without validating it. Sanitising Data

Friday, August 13th, 2010

Dynamic Watermarking

This PHP script allows you to upload all of your images to your web site without any visible watermarks and have the images display on the site with a visible watermark in each image. The one disadvantage of using this particular version of the script is that it has to run each time that the [...]

Friday, August 6th, 2010

Site Search Script

The PHP version of my site search script is two scripts in one because both a flat file and mySQL database versions are included along with a module to allow you to transfer easily from one to the other. The actual search facility searches the meta description and keyword tags from your pages which can [...]

Wednesday, August 4th, 2010

Post – Redirect – Get

Some people claim that this is the solution to avoiding having the same form submitted twice. It does reduce the chances of it happening and removes warning messages in Internet Explorer but doesn’t stop someone deliberately double submitting. To resolve all double submit issues requires a different solution which can be applied alongside Post – [...]

Tuesday, August 3rd, 2010

Random Ad Display

PHP provides a really simple way to randomly select two or more elements from a list and display them in appropriate spots within a web page without the same element appearing more than once. Here’s how to set up a Random Ad Display.

Wednesday, June 2nd, 2010

PHP Operators

As with variables, the operators in PHP do not work quite the same way they do in some other languages. For example the . operator has a different meaning in PHP to what it has in JavaScript and type conversions don’t always work the same. PHP Operators

Tuesday, June 1st, 2010

PHP Variables

A tutorial on how to define and use variables in PHP and how it differs from other languages. PHP Variables

Monday, May 31st, 2010

Introduction to PHP

This is the start of a new series of tutorials I am writing. There is one difference though between these tutorials and the usual tutorials you’ll find for teaching PHP because these tutorials are going to assume that you already have some programming experience and so will concentrate on pointing out ways in which PHP [...]

Tuesday, April 6th, 2010

Random Ad Display

The PHP required to select multiple ads to display on the same web page without displaying any one ad more than once is really simple when you know how. This page shows you just how simple itr is to set up a Random Ad Display.

Tuesday, March 16th, 2010

“Build Your Own Database Driven Web Site”

This book introduces you to both PHP and mySQL and how to use them together to create dynamically generated web pages using relatively modern methods. “Build Your Own Database Driven Web Site”

Sunday, February 14th, 2010

Dynamic Copyright Watermark

About the only effective way of protecting your images on the web is to watermark the images themselves. Any other form of “protection” is useless because the images are downloaded to your visitors’ computers in order for their browser to be able to display the web page and that image file can therefore be easily [...]