[Append DatabaseName]values[/Append]

Appends a new record with the specified field values to the end of a database.

To add new records to a database, put an Append context into a template (alternately, you may use the Append command from a URL or a FORM). Whenever WebCatalog encounters an Append context, it immediately adds a new record to the end of the specified database given the named field values inside the Append context.

Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):

[Append SomeDatabase.db]name=Grant&address=1492 Somewhere Lane&zip=90000&date=[date][/Append]

Try It!

The database "SomeDatabase.db" is opened, and a new record is added to the end with fieldname "name" being set to "Grant", fieldname "address" being set to "1492 Somewhere Lane", fieldname "zip" being set to "90000", and fieldname "date" being set to the current date. Notice that any WebCatalog [xxx] tags inside the context are first substituted for their real values before being written to the database. The name of the database itself may also be an [xxx] tag, as in "[Append [FormVarable]]".

Any fieldnames that do not exist in the database are ignored, and any fields you do not specify are left blank in the new record. You may specify an absolute or partial path to the database file, as in "/WebCatalog/Folder/SomeDatabase.db" or "../SomeDatabase.db" (relative paths start in the same folder as the template, just like URLs, so "../" will look "up" one folder level from the template, and "/" will start at the web server's root).