Author Archives: admin

Setting up a caching system with CodeIgniter

Caching for CodeIgniter is not great, the standard functionality allows you to either remove all cached files, or nothing at all. So once again it is time to look for a better alternative. Luckily we have another great addition from Phil Sturgeon, a custom caching library. Make sure your application/cache folder is writable – for [...]

Posted in CodeIgniter, PHP | Tagged , , | Leave a comment

Extending the CodeIgniter form validation library

Form validation has many faces and the default CodeIgniter set of validation rules just doesn’t cut it for me, or anyone. Luckily it’s very easy to extend the standard library, making it possible to add any kind of validation you can imagine. If you go to system/libraries/Form_validation.php you can have a look at all the [...]

Posted in CodeIgniter, PHP | Tagged , , | Leave a comment

Making global config data available from database in Codeigniter

It’s been a while since I wrote my last article, mostly because I’m working hard on this private project and have to spend all my time on it. This article discusses a way of setting global configuration options from database, available through the whole website. I’d still like to share with you this interesting bit [...]

Posted in CodeIgniter, PHP | Tagged , | Leave a comment

jQuery.getJSON() and sending special characters to PHP through a URL

A quick word on sending JSON requests that might possibly contain special characters. We’re going to send this data through a URL to our PHP script so we need to have some kind of encoding/decoding structure in place for it to work. First off, the encodeURIComponent() JavaScript function takes care of converting special characters to [...]

Posted in jQuery, JSON | Tagged , , , | Leave a comment