Geeky, sweary things.

Latest stories

Page Numbering (with x results per page)


Although there are several examples of this type of code to be found online, I had never found one that easily did what I needed and was flexible enough that we only had to change a few things to use it again – so I wrote my own. It links each page number (except for the current page number), prints Prev and Next links (if they need to be there), and also makes the current page number bold...

Alternating Row Colors in PHP/mySQL


Using alternating row colors in a PHP database application is a nice way to give the user some visual differentiation between multiple rows of results – and the best part is that it’s so damn easy.  I’m going to assume that you’re using CSS for formatting, but if you are still using HTML to set attributed like background colors in your database results out table (gasp!)...

PHP/mySQL Breadcrumb Trail


This lets you automatically create a breadcrumb trail navigation through PHP and mySQL, that would look something like:

Home >> Parrots >> Red Parrots

This type of dynamic breadcrumb trail is only possible when you are storing the menu items (or categories) in a table, that contains at least a name, a category id number and a parent category id number.

Snipe.Net Geeky, sweary things.

About Me

I’m a tech geek/dev/infosec-nerd/scuba diver/blacksmith/sword-fighter/crime fighter/ENTP/warcrafter/activist. I run Grokability, Inc, and run several open source projects, including Snipe-IT Asset Management. Tweet at me @snipeyhead or read more...

Get in Touch