The Cinch-O-Matic is a Flash application that takes the URL for a Web page on the Net, pulls out the form elements for a mail form, and then writes a PHP script to process the form. The resultant script is then downloaded to the user's hard disk.The source code for the Cinch-O-Matic is available here. An overview of how the program works is archived here. The program itself is deployed here.
Keep in mind that this is still in beta. Updates will replace the current files.
This application is probably more typical of how most software is written than of how it should be written. In other words, it is a hodgepodge.
The motivational idea was to write a simple mail form script generator for students first learning to use Web forms. Minimal knowledge of server-side scripting on the part of the students would be required, as well as minimal input on their part.
I believe that this original idea has been realized in the application. However, during development, I encountered a number of unanticipated situations that required patchwork fixing. For example, I forgot that elements such as checkboxes could have the same name, with a number of values returned in an array. Also, when I started out, I failed to account for the effect of non-PHP scripts on the application. The result is that I have patched in a series of widget-like functions, toggles, and whatnot to remedy these things.
The code is largely commented. Some of it nearly defies explanation. But, hey! It works.
You have been warned.