CORRECTLY POSTING BOOLEAN VALUES IN JQUERY

When I’m building Javascript/jQuery based webapps, my go-to method of performing AJAX requests is via jQuery .post() using JSON. My code normally looks something like this… var postUrl = ‘/someurl.php’; var postData = {’id’: 123, ‘data’: ‘xyz’, ‘bool’: true}; // … Continue reading

TIME ZONE CONVERSION USING PHP DATETIME CLASS

Following on from my post last month about problems with PEAR daylight saving, here’s a quick example of using the PHP DateTime Class which was introduced recently (PHP 5.2). Convert from UTC to Europe/London local time: $time_object = new DateTime(’2011-04-19 … Continue reading

MOVE YOUR WEBSITE PROPERLY USING HTACCESS

Sometimes you need to move an entire website to a new domain name. There’s lots of ways to do this, but if you’re not careful you might end up losing or confusing visitors (and google). Here’s a quick tutorial to … Continue reading