How To Pass Logged Userid & Clientid To The Table

Hiii all,

     I have two forms:

                        1. Client,

                        2. Employee.

and 3 tables logmaster,clientmaster & employeemaster.

I only gets the logged userid but unable to get the client id.

I want the HR to logged in then he should get client list when he select any client i should get that registerd client’s id from clientmaster and able to pass it to the employeemaster table.

If anybody has a sample code or project plz share with me it will really helpfull for the newbie like me…