Let's say my URL is the following:
https://www.example.com/downloads?query=RobinHood
In my template (.phtml
file), I have the following input:
<input type="text" placeholder="Query for books" name="query">
What I want to do is check if the URL parameter called query
actually exists, and if it does, I want to put it as the value for the input.
How can I do this? Thanks for any help.