At the company where I work, my predecessor made a number of questionable choices. One of those was giving far too many privileges to users in MySQL. He created many users specifically to connect to a single database, but gave those users root-level access to the system. Yikes! Fixing this was easy enough, but identifying which databases users actually needed access to was sometimes a challenge.

Every country in the world, and the U.S. is near the bottom of the list. We could use geolocation to pre-select it for U.S. users.

I was filling out a form online recently, and one of the questions was “country.” As I scrolled through a seemingly endless drop-down list—one that contained every country in the world—I lamented aloud that “United States” wasn’t right at the top. That’s when it hit me: We have reasonably accurate IP-based geolocation services available, so why not attempt to figure out where the user is, and then use our best-guess to pre-select that item in the list? A quick proof-of-concept shows that there’s no reason not to.

The What and How of Geolocation

Do you find yourself writing the same code at the beginning or end of each PHP file? Are you always starting and closing sessions or database connections? Good developers are always looking for ways to do less work and achieve the same effect, so it seems like there has to be an easier way to take care of these repetitive tasks.

When one of your users submits an empty search (that is, they click submit without entering anything in the text field), the default behavior for WordPress is to redirect to the home page, and no indication is given that there was a problem with the search. Unfortunately, this is not a user-friendly thing to do. How can we fix this?

A client recently called us in a panic. Search engines were associating her website with terms to which she was morally opposed. Although there was nothing we could do about the situation, the call got me thinking about keyword blacklisting, and whether or not that would be a good idea.Read More