Passing variable from a page to another.

Hi everyone,

i have a content type foo with 4 entries, when im on the detail page of foo_1 for exemple i have a link in my template to go to the contact form, how can i add a variable to this link like href=”/contact?foo=foo_1 then get it in my contact form to know where it came from ?

Thanks in advance for the help 🙂

Drupal version: