note
Purdy
Well, this is quite a broad question, but I'll take a stab at it.
<P>
I would first read & research [http://www.perldoc.com/perl5.6.1/lib/DBI.html|DBI], as it is pretty much the lingua franca of Perl & Database interactions.
<P>
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:
<P>
<CODE>
sub render_form {
%fields = shift;
print <<"_HTML_";
Updated
<input type="text" name="updated" value="$fields{updated}">
....
_HTML_
}
</CODE>
<P>
May even want to investigate [http://www.perldoc.com/perl5.6.1/lib/HTML/Template.html|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.
<P>
If they login with their previous work order, you query the database and populate the hash and pass that to your render_form function.
<P>
Otherwise, you just pass them onto your render_form function and the fields will be blank for them to fill out.
<P>
Then you need a new script (or handler within the current script) to take the fields (check out [http://www.perldoc.com/perl5.6.1/lib/CGI.html|CGI]) and either update the database (if they logged in) or insert a new record into the database.
<P>
HTH,
<P>
Jason
126350
126350