Software Review: the HeidiSQL front-end GUI for MySQL databases

September 1, 2008

Managing MySQL databases from the command line is painful.

There are solutions, of course - front-end Graphical User Interfaces that hide the command line, that make operations easy and intuitive. MySQL itself provides a free set of tools to this effect, but it isn't my favorite.

This review is of the HeidiSQL GUI, a freeware front-end for MySQL databases. It features an excellent user manager; simple database, table, field and record addition/editing/deletion, none of which require a single line of SQL code. Manual queries are made easy, as well, with syntax highlighting, auto-completion options, unlimited cut and paste, etc.

Of the half-dozen such programs I've tried, it is the only one I use. I use it a lot. Highly recommended.

Unique file names for uploaded files using PHP

August 28, 2008

Web page file uploads are very useful - custom front ends, absolute simplicity for end users, control over file types uploaded. But you'll need to guard against overwriting existing files when a file with the same name is submitted.

This four-line! PHP scriptlet creates a new file name from the original, appending an underscore and new, unique, sequentially incrementing number as required.

I also step through the code, bit by little bit - a neat little introduction to Regular Expression matching, if you're interested.

Contact Form to E-mail script validates e-mails and checks against e-mail header injection

November 23, 2006

Contact forms aren't hard to code, and the PHP mail() function is pretty simple - and yet, implementing such a form, handling the POSTed information, error-checking, and providing basic security, can quickly seem a daunting task.

Many people still provide e-mail addresses directly on their web pages. This is rarely necessary, looks dated, and malicious web-scouring spambots are getting better and better at plucking e-mail addresses from a page. You can munge the e-mail address, you encrypt it via javascript, provide it in image format ...

and still, sometimes, the spambots win.

Ars Informatica provides a very simple, easy-to-modify script to generate your own feedback form. It provides all the functionality mentioned in the opening sentence.

You provide two lines of code, total, and you're off. Though you may wish, and are free, to change this code as much as you like.