ARCHIVES

Clean your data to discourage SQL Injection attacks

February 24, 2009

An attack vector that is always present in applications is through an SQL injection attack and unless you are diligent about sanitizing your input you may likely become a victim of this exploit. The concept is simple and very dangerous – the sql interpretor uses the apostrophe to group information so if you have an [...]

Cart class helps you build your shopping cart application

February 24, 2009

I don’t like the cart classes that I have seen around. For me I feel icky if the cart is required to do more than it should. In real life – when I go to the store I just put things into my cart – it does not go above that. It doesn’t calculate my [...]

Get the most relevant value from a list of possible inputs

February 24, 2009

Another thing that I often find myself programming repeatedly is a default value checker. Say you want to keep track of a user defined variable like a language id. There can be a few different points where this variable can be defined – $_GET, $_POST or $_SESSION. You either write a couple of ternary operations [...]

Registry class helps calm the chaos of variable control

February 24, 2009

One of the hurdles I find when building large scale websites is that it is often daunting to manage all of the variables that you create along the way. It is all to easy to lose control of your variables especially if your not using object oriented programming. I decided it was time to create [...]