News & Blog

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...

MySQL Table Not Auto Incrementing Past 127

April 12th, 2010 - Posted by Steve Marks to MySQL, Web Development.
When inserting records into a MySQL table that contains an auto-incrementing field you might at some point start receiving the following error: “Duplicate entry ‘127’ for key 1” If this is the case it means the datatype of the field in question is set as ‘tiny...

Using window.open Within a Link’s href Attribute

April 10th, 2010 - Posted by Steve Marks to Javascript / jQuery, Web Development.
The Javascript window.open() function will open a popup window with a specified URL and is normally placed as a link’s ‘onclick’ action: Open Popup Sometimes however, if using a CMS for example, the onclick option of a link is not accessible and all you have access to is ...

Detect Leaving Visitors with jQuery

April 8th, 2010 - Posted by Steve Marks to Javascript / jQuery, Web Development.
Users leaving your website is never a good thing, but there are some scenarios where you may need to catch them before they head elsewhere on the web as a result of them clicking a link on your site. Let’s imagine that you want to bring to the users attention the fact they are leavin...

SagePay Form Module for Magento

April 8th, 2010 - Posted by Steve Marks to Magento, Web Development.
SagePay, previously known as Protx, has always been a popular payment option for both myself and customers when working with e-commerce sites, primarily because of easy integration, good documentation and quick support response times when issues have cropped up. Three types of integration ...

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...

Open jQuery Colorbox onLoad

April 7th, 2010 - Posted by Steve Marks to Javascript / jQuery, Web Development.
Update – 26th December 2010 (Credit to azrad) Since writing this post it seems that ColorBox has been updated meaning the solution below is now longer needed. Simply using the latest version of colorbox will allow you to open the ColorBox onLoad. I came across a scenario today where ...