Pass dynamic data from a link to a form

In WordPress, use the following to extract a string from a URL:

$jobreference = $_SERVER['QUERY_STRING'];

So from a previous page you can add a dynamic string to a link. When it leads to a contact form, the unique string can be extracted and echoed into a form field. For example, from:

$jobreference will be: “string”


%d bloggers like this: