The above function performs a few tasks. It gathers the values from the
landlord form. Note how each field ID is made unique by appending the
unique landlord ID. The form values are then concatenated to a parameter
string, together with the updatelandlord command. By invoking the reloadlab
function, the tab title is instantly replaced by the new, specified values. The
content of the tab will be replaced by the server side response. Upon server
call back, the landlord list on the left of the screen is also updated if the list is
currently visible.

The above function parses the values from the parameter string, updates the
database with new values and displays the updated content.

The GETVAL function ensures that the input value is numeric. GETSTR is a
wrapper function for $_GET; it detects Unicode strings and encodes the
value correctly.

The showlandlord function is defined in a separate file so it's important to
include the file at the beginning of the script.

Now review the files we've just created or modified and pay attention to the
piggy-backing mechanism. In the updatelandlord JavaScript function, we
could have simply sent a request for updating the record; and upon
completion, send another request for displaying the record. Instead we send a
single updatelandlord event, and it's up to the server-side handler to both
update the data and return the new result. The file showlandlord.inc.php is
structured to be called by both myservices.php or inside another function.

Also note how file dependencies and parameter parsing are all done in the
implementation of server handler. The switch clause in myservices.php
remains simple and agnostic of the underlying structure.