Gossamer Forum
Home : Products : DBMan : Installation :

Displaying the $db_userid

Quote Reply
Displaying the $db_userid
Hi all,
Is is possible to display the $db_userid
in the Add Record form, just like the counter and the date. Sorry if this question
has been already answered. Thanks for all the help.
PB:-)
Quote Reply
Re: Displaying the $db_userid In reply to
Sure. Just stick the variable in wherever you want it to appear.


------------------
JPD
Quote Reply
Re: Displaying the $db_userid In reply to
Hi JPDeni,
Thanks for the quick reply.
I was able to get it to work(see below). But using this method, the userid appears in all the displays(search, modify and delete), unlike the date and counter which only dislay in the add record.
Am I doing something wrong, or is there another way to do this.
Thanks.
PB:-)

<input type="text" name="UID" VALUE=" $db_userid">
Quote Reply
Re: Displaying the $db_userid In reply to
I guess I didn't quite understand what you wanted to do.

What you'll want to do is go into sub html_add_form and instead of

&html_record_form (&get_defaults);

use

%rec = &get_defaults;
$rec{'UID'} = $db_key;
&html_record_form(%rec);

Then, in html_record_form, use

<input type="text" name="UID" VALUE=" $rec{'UID'}">

I think this should do what you want.

------------------
JPD
Quote Reply
Re: Displaying the $db_userid In reply to
Hi JPDeni,

Your fix worked perfectly. Your amazing!!
Thanks a million.
PB:-)