Get current logged in User ID and use it in a tekst box

On a dynamic page, based on Database 1, I would like to include a form that saves a number of tekst inputs to Database 2, including the current user id of the logged in member. I thought about using code to getting the user id in a hidden textbox, and connect this textbox to a fieldin Database 2.

The code to get this ID shouldn’t be complicated I think, but I haven’t managed to succeed.

Could anyone help me out? Thanks so much!

Your question is very similar to this one… not completely exact the same situation, but very similar…

Maybe it will help you to solve your issue, too!

Thanks Velo-Ninja! It seems like it’s in the direction that I’m searching, but it’s quite difficult for me to “translate” it into my situation. Could you share a full example code if you have it? Thanks so much!