Tips n’ Tricks
- Tip No 5
The “Headers Already Sent” error is incredibly common, and I receive many many questions from all over about what it is and what caused it. So let’s clear all of this up once and for all. The HTTP response generally consists of two parts, the headers and the content. The headers…Read More
- Tip No 4
Checking for variables before you use them can be a tedious process, and this step is often missed out in PHP code, leading to masses of PHP Notice errors and possibly leaving the application vulnerable. However, there is a simple solution to this problem, something called the ternary conditional operator.…Read More
- Tip No 3
Everybody makes mistakes, and despite how much you want it, your php web application will never be free of vulnerabilities or bugs. The best way to deal with this is encouraging users to test out your application to its limits and offering a quick easy way for them to report…Read More
- Tip No 2
Always try to format your php code to your own standard, and include lots of comments throughout your code. Make sure your standard is readable and provides an easy break down of your code, especially for someone who has never seen your code before. Once you have developed your own…Read More
- Tip No 1
Every so often I will be posting tips/tricks that can be helpful when writing php code or designing php applications. This will be the first of the “series”: Try to include files, rather than creating a single of file containing all the code. While the single file may sound “cool” it…Read More

