This function is great for when you have a multi-page form such as an application. This function forwards fields on one page to hidden fields on the next page, and so on. Very
simple to call. The beauty of it is, it also will handle arrays with multiple dimensions. If you have a field with the same name on the next form, it's a good rule to call
field_forwarder() at the BEGINNING of your form so that when that form is passed, the field (with the same name) will overwrite the previous form. It's also good to put
field_forwarder() at the top so the final page will have all the fields in the order of the application. This is a recursive function, i.e. it re-calls itself when it
encounters form elements that are arrays such as: Finally, if you wish to print out PHP code of the array instead of hidden fields, add this line right before you call
field_forwarder(): $FFoutputType = 'print'; and it will print out, in text form, the values of the fields as php variables -- this is great for storing php code in a database.
Over the summer I wrote a utility class to make it easy to pull information from HTML forms and place into databases and do various manipulations on arrays without having to
write much special code for each case. I have used this class library from everything from a member management database to secure credit card updating utility. Key features:
1. Return array data where field keys match a certain prefix such as CUSTOMER_, CREDITCARD_ (even from HTTP_POST_VARS). 2. Create MySQL Insert, Update, and basic Create Table
statements from associative array data. Note: There is a lot of code here and it is very useful. The documentation could definitely be better, but I do not have enough time to
document this as well as I would a commercial product for the time being. The code is intended to be readable and each function should have a �JavaDoc like� header. I welcome
comments and/or additions to this library class.
Form processing program. A trimmed-down version of the popular Phorm script, Phorm Jr. has just email, acknowledgement and text log capabilities, but with the same security
and error-handling features of its big brother.
Validation class for user submitted data. I had many times had to make sure people submitted the right kind of data into form fields. After writting many functions in many
places. I've decided to compose on that i can use all the time