learning some more php
I did a couple of cool things with php this weekend, only one of which you’ll be able to check out. One thing I managed to do was build an online database from my timesheets that I use to keep track of billable web dev work, the other was to build a links database to run my links page. My links page has a pretty long history. Since I first got online (~1993?), I’ve had some kind of links page with all of the websites I frequent listed. This was always useful since I could then access those links at work or at a client’s place when I was working on something. I’ve always kept this page plain text (except for the W3C badges - luckily the page still validates!) so it loads really fast - there’s nothing more annoying than a page that loads slowly - especially when it’s a reference page you use all the time. Up until this weekend it was still a straight html page with hand coded links. No more! I finally got up and dumped those links into a MySql table and hacked together a set of php scripts to build the webpage (which looks the same incidentally) with the added benefit of keeping track of how many ‘hits’ each link gets. I can’t take too much credit for this as it’s mainly stolen code from Alphibia Design although with some changes to allow for the layout of my page. However, I learned a lot doing it. The personal links (those in the blogs and in8 sections) are ordered such that the more hits each link gets, the higher in the list it appears. I haven’t bothered to figure out how to integrate this page into the main blog (which also has a links database), but I’m pleased with it anyway.
I’m more proud of the other page which I can’t link to (it’s password protected for client access only), because I wrote it all myself, but I have plans to use the code to do some other stuff which I will be able to post.


Comment posted on 9-24-2005
I built an administration page for the links page which allows me to
submit new links and delete old ones. I haven’t started working on the
portion that should allow me to edit an existing entry, so for now it’s
only adding and deleting, but it works - and I had to learn a bunch
more stuff to make it so. Can’t show you this page either - it’s password
protected for obvious reasons.
Comment posted on 9-24-2005
I added a way to sort by name/age/hits and I broke the validation, so
the badges are gone for now until I can correct all the bad juju.
Comment posted on 9-25-2005
Some more changes to the links page. Now the sections and the links
are built in a single block of code (as opposed to a block for each
section). Getting the page to lay out properly was a pain, and I
eventually ended up breaking up the sections (they used to remain
together), and I haven’t figured out how to sort the sections, but only
within the sections, but that should be easier now that I have given up
on keeping them together. Some other information like total links, and
most popular link were added. Lots more to learn and do! I spent some
more time on the (hidden) admin page, but it’s not done either.