Facing the back end

Allowing user access to your MySQL tables just got easier thanks to PHPMyEdit. Hed: Facing the back end Dek: PHPMyEdit makes MySQL databases Web-accessible.

There are two parts to any Web application, a front end and a back end. I have become very good at putting together the front end of Web sites, but tend to lag, if not outright procrastinate, when it comes to finishing up the back-end interface.

The fault is not entirely mine. The front end of the Web site is what everyone sees, including the boss. When the boss sees the public page working, there is the assumption that the project is completed. The corner-cutting programming and the troglodyte approach to data entry on the back end are hidden, so at that point, the boss says, “On to the next project please.”

In addition to hurried schedules, there’s no glory to working on the back end. Back-end interface pages take time to build, and receive only a modicum of thanks. Sure, elements can be borrowed from already completed scripts, but not all databases are created equally, and there are always time-consuming and tedious modifications that don’t make the top of the fun chart.

This week, however, I found a tool that changes all that. Faced with three finished front-end database-driven site projects, I was preparing to knuckle down and crank out the administrative pages. From the back of my mind came a nagging reminder that I had seen a script on Freshmeat that promised to take any MySQL table and instantly create Add/Edit/Delete views of available data. What I downloaded is called PHPMyEdit, and I love it.

Now at version 3.1, PHPMyEdit is written and maintained by John McCreesh and was recently converted to PHP Classes by Pau Aliagas. PHPMyEdit is architecture-independent. If you are running PHP and MySQL, you can use this tool. PHPMyEdit consists of a single PHP page accessed through a Web browser. After completing a quick wizard to determine your database and table, the script will then provide you with code to copy and paste into your own PHP page, which then enables your Web-connected coworkers to modify data in the table you chose. Including the new PHP class drives all these modification scripts.

PHPMyEdit will adapt to any MySQL datatype and also allows for searches within individual fields. It’s highly configurable, allowing you to control the fields your users can access. Data can also be filled in via drop-down lists with data selected from separate tables. Style sheets are employed to control the layouts, so matching your administrative site design is straightforward.

With PHPMyEdit, I was able to quickly give a user access to three content tables within about an hour of downloading the script. This included installation as well as a few modifications. I recommend PHPMyEdit as a very useful addition to any site administrator’s toolbox.

Garth Gillespie is architect and chief technologist for ComputerUser.com.

Related posts

Leave a Comment