Which page do you want this to appear on? And from which database? Is the ID the db_key field?
Try using these codes in the sub-routine where you want the name to appear:
Code:
$in{$db_key} = $db_userid;
my ($status,@hits) = &query("view");
if ($status eq "ok") {
%rec=&array_to_hash(0,@hits);
$name = "$rec{'Contact'}";
}
else {
$name=$db_userid;
}
Change
Contact with the name of your Username field.
You may have to change the following codes:
To the following if you printing from the first database, but having the name printed in the form page for the second database:
Code:
%rec2=&array_to_hash
And also change $rec to $rec2. You may also have to add the switch sub-routine codes to print from the first database into the second database add form routine.
Hope this makes sense.
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums