Basic Insturctions for using the software

User Guide:

Select Primary and Secondary tables: 1. In this screen, the Table and Table Types are selected. First pick up a table and then select whether it is a primary or secondary table. With the five choices, the program can generate forms for a single and and upto five tables. For a single table form, make sure the table type is primary. Remember the default is None. If you do not pick the tables properly, nothing will work.

Select Relational Fields from tables: 1. In this screen, table type, main and relational columns are picked. For the primary type, the main column will be primary index column. The relational column should be same as primary index. Make sure that you have one common column name in both the primary and secondary table. In the seconadry table, the main column will be the primary index of the secondary table and the relational column will be the foreign index of the table joining the previous table. Little confusing? Let us say we have three tables customer, invoice and invoice detail. The table structures are as follow: Customer Invoice Invoice Detail Primary Index: CustID InvID DetID Foreign Index: None InvCustID DetInvID The selection of primary and secondary indices are as follows: Prmary Table Secondary Table Primary Index Relational Index Customer Invoice CustID CustID Invoice Invoice Detail InvID InvCustID Invoice Detail DetID DetInvID

Under the PHPFormWizard 2.0 header, you will find ten headers. The following denote the purpose of these variables;

Details:

1. Most of the time, you need not change anything in the Name column. In the use? column, you can prescribe which columns you want to be shown on your form. If any filed is unchecked, it would not show in the sql statements and on the form.

2. On the Input Type column, you must pick one of the names columns as primary variable. This is critical in search operations. If you do not define a primary key value, the program picks the first column as the primary key. The auto_inc&primary type is specially suited for the auto increment columns. The program generates the field as hidden field for which no data input is required. In most cases it happens to be the primary field. I have not capable of using the file option successfully. Use text for most general inputs, Date for date, and others for their respective needs.

3. I leave Size, Maxlength, and Default columns intact.

4. Headers are important for display purposes. You should always prescribe a human readable tag rather than cryptic programmer's tags. The test1 database has a demo table. The demo table columns are id, var1, .. etc. If you leave the headers column blank, var1 will show up as header. I will use Username or something pertinent in this column to make users feel at home.

Headers column has also an important role in select Input types. You can prescribe your own header and option or choose these options dynamically from another table in the same database(confusing?). Here are some examples;

Manual Selection: Suppose you want to select gender of the user. Using Sex for the header, Male and Female for choices, you would enter Sex:Male: Female in this column. The colons must be used to separate your choices.

Table Selection: Suppose you had a table named Dept with id and Deptname as columns. You would like to display Deptname but would like to save its id in your database. Use table:Dept or Table:Dept as your header choice.

5. Option column selection is only important in case of select, radio, and checkbox cases. For manual selection you would use either M:F or 1:2 for the gender example. For table selection case, you would use either Deptname:id or Deptname:Deptname in the above case. Similar rules apply for checkboxes and radio choices. If you still run into problem, please send me an email.

Multiple select and checbox inputs use array to store the inputs. Make sure that you have enough varchar(255) storage for these cases. If you are using checkbox_int, the database field should be a long integer or varchar(64). The choice of checkbox is upto the user. I beleive that the checkbox_int should have better performance than array type.

6. Validation: The validation headers are selectable and they should be consistent with your input type choices. You can use text or "Number and Character" choice for most of the name, address, city etc type inputs. The phone number, social security no(9 digits) and zip code are US standard compatible. The state is also US stricted validation. The country code is two character code(Check the code in class.Validator.php3). If no validation is required, use default none setting.

7. Search-On?: This is an important search attribute. By default all variables can be searched. However the best practice is to have only significant attributes active. Make sure to check off unnecessary values.

8. After pressing the Generate button, you will be prompted with a Next button if you have a multiple table form. After processing the last form, you will be in Thank You screen. At the bottom of the screen, you will find a list of available programs. Clicking on the link will launch the form application. Presently all the generated forms and templates are stored in the ./app directory. The ./app/lib directory stores connection webapp.php script. Do not delete the other links and programs in this directory.

Thanks for choosing PHP FormWizard 2.0 program!