Category Archives: php

Using Laravel: How To Use Routes, Controllers and Filters For Public and Private sections of a CMS site

By | January 5, 2013

If you are reading this you probably already know what Laravel is, but just in case: it’s a PHP framework for building applications. It has all the typical stuff such as MVC, DAO, ORM, a templating engine (also supports Twig from Symfony), routes, controllers, clean URLs, RESTful support etc. I really like it because it’s… Read More »

How to access cross-domain data with AJAX using JSONP, jQuery and PHP

By | July 9, 2010

I’m guessing that if you are reading this post you have already encountered the problem of the same origin policy with regards to retrieving data with AJAX from urls in other domains than your’s (the requesting domain). This policy, enforced by browsers, means you cannot fetch raw data from other domains with straight AJAX calls.… Read More »

How To Assign The Current Date and Time to a MySQL Datetime Field using PHP

By | February 18, 2010

This is a no-brainer, but I always forget how to do it. MySQL datetime fields are stored in this format: 2010-02-18 10:33:18. Here’s a trivial example showing you how to populate a datetime field with the current date in the correct format, then write it to a table: Another question might be: “Why?” – when… Read More »

Joomla 1.5 has wrong path for css, js files – edit your configuration.php file

By | December 19, 2009

I just moved a Joomla 1.5 install from my iMac to a hosted site. The home page showed up fine, but subsequent pages were missing all styles. It turns out that I needed to change the variable $live_site in configuration.php from ” to = ‘http://www.example.com/mypath’. I’m not clear on why it worked on my MAMP… Read More »

Using Aptana Studio 2.0 and PDT Plugin for Drupal Module Development

By | December 3, 2009

Aptana now uses the official Eclipse PDT (PHP Development Tools) plugin instead of their own PHP editor. I have Aptana 2.0.2, build date November 10 2009 on my Macbook.  I’m building a Drupal module, so I need to have PDT recognize (and correctly color-code) files with .module, .info and .install extensions.  There is a Drupal… Read More »

Articles I’ve Written on IBM i (iSeries) Technology Subjects

By | September 17, 2009

I’ve written a few articles in recent years that have been published by MC Press Online, relating to IBM i topics. If you don’t know what the IBM i is (or an AS/400, iSeries or System i), you can stop reading! Here are two lists of links to those articles. The first list is general… Read More »

Forays into PHP and MySQL

By | April 19, 2007

I’ve just started working extensively with PHP and MySQL.  Here’s a simple tip that took me a while to figure out (despite copious examples on PHP.net, I couldn’t find this one: My MySQL table has a  Timestamp (Z) field, used to assign the current date and time to it when a record is added. Using… Read More »