Well, this is quite a broad question, but I'll take a stab at it.
I would first read & research DBI, as it is pretty much the lingua franca of Perl & Database interactions.
Design-wise, I'm a little out of sync with what's the latest & greatest way to do this, but I would recommend creating a subroutine to render the form and use a parameterized or global hash value to populate the various input fields. IE:
sub render_form {
%fields = shift;
print <<"_HTML_";
Updated
<input type="text" name="updated" value="$fields{updated}">
....
_HTML_
}
May even want to investigate HTML::Template. Then you can create a new form/page where a lab worker can "login" with their previous work order ID (which DBI can generate for you) or click on a link to create a new work order.
If they login with their previous work order, you query the database and populate the hash and pass that to your render_form function.
Otherwise, you just pass them onto your render_form function and the fields will be blank for them to fill out.
Then you need a new script (or handler within the current script) to take the fields (check out CGI) and either update the database (if they logged in) or insert a new record into the database.
HTH,
Jason |