We will use a very simple, one panel database. The fields will be:
The panel will be indexed with fields one and two, in that order. The idea is that a numeric identifier will be assigned to each "user" of this database. Each user can store as many name to value associations as they wish. Field two becomes a kind of key, used to retrieve an arbitrary value stored in field three.
Each time the script is run, it is passed the following CGI variables from a form that it presents.
To get things started, a user can run this script passing in only the ID number. The script will respond by not doing any database access, but merely presenting the form. Then database records can be created by typing a name into the first field, a value into the second field, the letter 'P' into the third field, and clicking on the button. A database value can be retrieved by typing its name into the first field, the letter 'G' into the third field, and clicking on the button.
Frames have names. This code assumes that the first frame is named "db" and the second "fs". The callback functions are named "put-result", "get-result", and "err-result". The first of these expects one argument, a number error code for the result of the put operation (or zero if it succeeded). The second expects the value (field three) of the retrieved database record. The last expects a numeric error code for the get operation if it fails for some reason.
Sign or browse our guest firstname.lastname@example.org
A. Lewis Bastian, Jr.
Disclaimer*DataPerfect® is a copyright of Novell, Inc. Sanbachs.com is not affiliated with Novell, Inc.
visitors since June 21, 2001.