My objective is to show content of external database on a wordpress page.
I have created a page template that includes php and an sql query that will query a non wordpress database on the fly. I wish to control the ouput of this page by getting a variable from the url.
For example a url linking to this page may look like this:
https://myblog.com?merchant=xyz
I would then like to grab the “merchant” variable and insert into the sql code on the page template.
I have tried
WHERE merchant = ‘<?php echo $_GET[“$merchant”]; ?>’
without success
Are there any suggestions?
Many thanks in advance