Code for contact form in product dynamic page

Please help me with sample of code to place it in product dynamic page in order to gather the requests and identify which product the visitor are interested in.
I know how to create and connect user input contact form (email, Name, Phone) to see the requests in date base, but I can’t see which the product he/she talking about :))