Quote:
Is there a way to autofill a database field from the password file and then hide that field from the user?
If you mean hide it so it does not appear on the form, yes that is easy, just make <INPUT TYPE="hidden" and it will not appear on the form, but it is visable in the URL that is sent, so it "could" be manipulated by the user.
This is done for you for UserID in this section of html_add_form
<form action="$db_script_url" method="POST">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
Regarding loading email from the password file, I suspect you would use a similar set of code as that which pulls in the "uid" from the password file, which I think occurs here,
sub main {
# --------------------------------------------------------
my ($status, $uid);
local($per_add, $per_view, $per_mod, $per_del, $per_admin);
You need to watch out for records that might get editted by someone other than the user, such as an admin, as when the record is editted, the admin's userID and email will replace the User's, but that has been covered well, just an if statement that keeps the original value of the record rather than the admin's UserID.