A couple of years ago, I ran across a post on a gun owner’s forum where the poster said that he was going to write a database program for gun owners to keep track of their firearms and make it freely available to the forum members. Unfortunately nothing came of it, and the original post seems to have disappeared. I decided to give it a shot myself. The current version is written in PHP5 and uses an SQLite2 database (For small datasets, I think SQLite is a great choice). I used my address book (PSWAB) as a starting point, but I “enhanced” the code by making use of arrays to manipulate data and functions to better compatmentalize the coding. It is still a work in progress, and I may make additional enhancements. I may also rewrite it in a compiled language as a desktop application to eliminate the need for a web server. (I have to be careful here; I know that most people use MS Windows, but I use Linux. Any compiler I use will have to support both operating systems.)

The field titled “Picture” is for a single file name such as mypicture.jpg. the picture files need to be located in a directory called “images” in the same directory in which thescript is running.

The script follows (a zipped copy can be found here):