Categories
PHP

CSV to SQL converter script using PHP

This is a very old script I wrote to take CSV data (exported from Excel) and create INSERT statements for an existing MySQL database table. Lots of room for improvement, and certainly not safe for use in a production environment in this form – but as a tool it gets the job done. <html> <head> […]

Categories
jQuery

Type-ahead look-up jQuery AJAX demo

This was one of my first jQuery experiments. jQuery AJAX requests to a PHP / MySQL back-end populate the drop-down of the input control as you type. There is some jQuery UI in there as well for the dialog boxes. See the demo here…

Categories
Misc Code

Drag-and-drop sortable list using Script.aculo.us

This is some quick work I did quite some time ago when assessing different JavaScript libraries. This demo uses Script.aculo.us with a PHP / MySQL back-end. The drag-and-drop interface allows the sorting of the list items. I notice on the website that the current version is dated 23 December 2010. I am guessing it is […]

Categories
PHP

Search a multi-dimensional array for a value and return a breadcrumb-like trail using PHP

This one had me stumped!! Working with arrays is something that every developer has to be comfortable with. Fortunately PHP has mountains of array functions to offer. Consider the following data: <?php // here is some test data $categories = array( array( ‘name’=>’Minerals’ ), array( ‘name’=>’Animals’, ‘children’=>array( array(‘name’=>’Mammals’), array( ‘name’=>’Reptiles’, ‘children’=>array( array(‘name’=>’Puffadder’), array(‘name’=>’Cape Cobra’) ) […]

Categories
WordPress

Crayon Syntax Highlighter for posting code in WordPress

So, after the blog was hacked and the hosting company could not restore it from a back-up, I have embarked on setting up the blog from scratch. I needed a syntax highlighter and went in search using the WordPress dashboard. I came up with the Crayon plug-in. It certainly seems to have a far fuller […]

Categories
jQuery

Text file upload and search highlight utility with PHP and jQuery

This was my second pass at an assignment given to me as part of a job interview. I decided to get a little flashier with this solution… The brief was to have an upload utility that allowed a search term to be specified and a text file to be uploaded, with the contents of the […]

Categories
PHP

Text file upload and search highlight utility with PHP

This was actually an assignment given to me as part of an interview process some time back. The brief was simple: to have an upload utility that allowed a search term to be specified and a text file to be uploaded, with the contents of the uploaded file then displayed in the browser with the […]

Categories
PHP

Creating online QR codes with goQR.me API

QR Codes are fashionable little things with many, many uses. I had previously worked on an implementation of QR Codes in a project using the Google Charts API which is now deprecated. Fortunately, there are any number of API’s available: this is a simple implementation of a QR Code generator using the free goQR.me API. […]

Categories
jQuery

Chosen JavaScript plugin for Prototype and jQuery

Chosen is a JavaScript plugin for Prototype and jQuery that makes long, unwieldy select boxes much more user-friendly. For more information (including usage, explanation and FAQ’s), check out the online documentation. link to Chosen demo page

Categories
jQuery

Datatables jQuery plug-in

I used the Datatables jQuery plug-in extensively in a work project. It is pretty easy to implement and offers some pretty useful functionality: search, pagination and ordering by column Here is a link to my Datatables demo page https://www.datatables.net/