News & Blog

Opening PHP Tags Not Being Recognised

September 20th, 2010 - Posted by Steve Marks to PHP, Web Development.
A block of PHP code can be started using an opening tag of either ‘<?php’ or ‘<?’. The latter, also known as a short tag, is generally not recommended any more due to the widespread use of XML and can result in the server parsing the wrong code in the wrong co...

Removing the Query String from a .htaccess Redirect

September 17th, 2010 - Posted by Steve Marks to PHP, Web Development.
Are you doing a URL rewrite using a .htaccess file but the query string is being carried through also to the new URL, even though you haven’t specified it using QSA (Query String Append)? To prevent this additional query string being appended to the destination address simply add a q...

CodeIgniter Google Maps V3 API Library

July 2nd, 2010 - Posted by Steve Marks to Javascript / jQuery, PHP, Web Development.
Looking for a Laravel implementation of this library? You’re in luck. Click here. In early May 2010 I wrote a Google Maps API library for CodeIgniter. This used Version 2 of the Google API and was pretty limited. Well, I’ve been working tirelessly over the past weeks to get a n...

Losing CodeIgniter Sessions

May 21st, 2010 - Posted by Steve Marks to PHP, Web Development.
I had a scenario earlier today where I was setting a session using the CodeIgniter Session library, it was being set fine but then as soon as I navigated to another page it was being lost. After much research and testing it turns out it was due to the fact my session name contained an [......

Google Maps API Library for CodeIgniter Framework

May 1st, 2010 - Posted by Steve Marks to Javascript / jQuery, PHP, Web Development.
UPDATE: I have now released a new version of this library that uses Version 3 of the Google Maps API. Click Here to Read More I am pleased to announce that the first release of my Google Maps API library for the PHP framework CodeIgniter is now ready and available for download. Seeing as e...

Enabling $_GET Variables when using CodeIgniter

April 23rd, 2010 - Posted by Steve Marks to PHP, Web Development.
The PHP framework CodeIgniter, by default, does not allow the use of passing parameters via the URL query string, forcing developers to use URL segments to pass information between pages. There are however some scenarios where you do need to access the $_GET array, for example when integra...

Simple AJAX / PHP Enquiry Form Tutorial

April 12th, 2010 - Posted by Steve Marks to Javascript / jQuery, PHP, Web Development.
During my 7 or so years of working with PHP I have created literally 100’s of enquiry forms. From simple ones containing just a couple of fields to complex ones (sometimes maybe a bit too complex) containing hundreds of different variables. They all essentially however do the same th...

Generating a Unique ID Using PHP and MySQL

April 7th, 2010 - Posted by Steve Marks to MySQL, PHP.
A recent e-commerce project I was working on required me to generate a unique order reference number containing both letters and numbers for every new order placed. Generating a unique reference was easy, but what if the generated output already existed in the database? Wouldn’t be v...