Go to the first, previous, next, last section, table of contents.


Database table parameters

When a database record is modified or inserted, the HTML form must name the cgi-bin parameters in a consistent way so that the cgi-bin knows what was changed and modified.

The basic rule is that the parameter is named after the field name. Thus for a table containing a field named comment, when setting the value of the field to the comment, the parameter will have to be comment=the%20comment.

This convention is simple but ambiguous, if two fields of two different tables have the same name, for instance. To cope with this situation, the name of the parameter may be prefixed by the name of the table. This is always optional.

When a list of values is proposed to the user, using a menu or a set of checkboxes, it is sometimes possible to accept a new value. For instance if the user is prompted to select the Internet provide he uses, an additional input box may be added to allow him to type the name of his provider, if it is not listed. This can be achieved using a special tag, only available for dictionaries based on tables and not on the native set or enum type of MySQL, See section Relational constraints. The name of this tag is the name of the field suffixed with _alt.

Here is an artificial example regrouping all the database parameters.

<form>
Simple case
<input type=text name=url size=20>
Table name specified
<input type=text name=company_name size=20>
<input type=text name=customer_name size=20>
Alternate value within a list
<select name=provider>
<option value=hrnet>HRNet
<option value=eunet>EUNET
</form>
<input type=text name=provider_alt size=20>

Here is the generic form of parameter names for database records.

`fieldname'
`table_fieldname'
`fieldname_alt'
`table_fieldname_alt'


Go to the first, previous, next, last section, table of contents.