Home | Downloads | PHP Writer |     Share This Page
PHP Writer

Current Version: 1.7 (12/02/2007)

All Content © Copyright 2007, P. LutusMessage Page

 
Description

PHP Writer interface

PHP Writer is a PHP-based MySQL database client. It is the most recent in a long series of database clients I've written over many years, incuding DBEdit (Windows only) and DataProspector (Java based). I have quite a large collection of flat-table databases for various purposes, and I have particular needs a database client needs to fill, that end up deciding how these programs look and behave.

First, I've always preferred a dual-display layout, with a selectable table plus a row-oriented entry form both visible at once, as in PLCash, my personal-finance account manager program. I also prefer to have a Web page as an interface, only because I hate designing GUI interfaces that won't even work in five years because of shifting tastes in GUI support environments.

Second, I prefer a database client that does certain things innately. If I create a new, empty record and if the table design includes fields named "Date" or "Time", well, why not automatically fill them in with current defaults? Third, if I want to make a copy of an existing record, make some changes and add it to the database, the program should locate and delete any primary-key values to prevent an obvious database error. PHP Writer takes care these things.

To use PHP Writer, you need to have access to a Web server that supports PHP and that has a MySQL database engine. Most Linux distributions can be set up for this role in a matter of minutes. I am not saying that PHP Writer is a Linux program or that it won't work under Windows, I am just saying it's much easier to set up under Linux, like most things.

I want to caution my readers that I have only used these database clients on intranets, and I haven't paid much attention to security issues. Some routine user input filtering is performed, but I haven't evaluated the script for security vulnerabilities in any systematic way. If you intend to post this script on the Internet, by all means carefully examine it for security lapses and holes.

The script can be customized in a number of ways. Read the listing to see some of the more hardwired ways. The script can be called with arguments specifying server, user, database, table and even query, like this:

php_writer.php?server=name&user=name&database=name&table=name&query=string

Click here for a pretty-printed listing, and click here to download a plain-text version of the script.

PHP Writer is © Copyright 2007, P.Lutus and is released under the GPL.
Version History
  • 12/02/2007 Version 1.7. Fixed a bug that prevented specifying a table name on the comamnd line.
  • 11/19/2007 Version 1.6. Fixed some minor bugs.
  • 11/16/2007 Version 1.5. Because of increasing complexity, rewrote this application as a PHP class. Much improved.
  • 11/15/2007 Version 1.4. Fixed a bug that interfered with the creation of new records.
  • 11/15/2007 Version 1.3. Cleaned up a few small errors, improved appearance, removed link to a local CSS file.
  • 11/15/2007 Version 1.2. Fixed a bug that prevented the default wrap value from being assigned.
  • 11/14/2007 Version 1.1. Increased default memory allocation to 100M so I could read a ZIP code table. The memory limit is now easily settable in the script.
  • 11/14/2007 Version 1.0. Initial Public Release.
 

Home | Downloads | PHP Writer |     Share This Page