<p>I'd go with the built in craft functions.</p>

<pre><code>craft.request.getQuery('login')
</code></pre>

<p><a href="https://craftcms.com/docs/templating/craft.request" rel="nofollow noreferrer">craft.request documentation here</a></p>

CC BY-SA 3.0
2017-10-16T14:42:44.207Z
2017-10-16T23:24:21.913Z
2017-10-16T23:24:21.913Z
Jim Wyse
<p>I have a basic login form that's talking to a separate server that's out of my immediate control. I'm trying to read the responses it's sending in the URL within the Craft template.
For example...</p>

<pre><code>http://www.adacore.com/login?login=incorrect
</code></pre>

<p>I've only ever done it before in PHP. Is it possible with Craft/Twig to access these variables directly? Or should I just read the <code>craft.request.queryString</code>?</p>

<p>And change the template accordingly as needed.</p>

<form><url>
How to read form response URL variables in template?
# How to read form response URL variables in template?

(Asked by: username_0 on 2017-10-16)

I have a basic login form that's talking to a separate server that's out of my immediate control. I'm trying to read the responses it's sending in the URL within the Craft template.
For example...
http://www.adacore.com/login?login=incorrect

I've only ever done it before in PHP. Is it possible with Craft/Twig to access these variables directly? Or should I just read the craft.request.queryString?
And change the template accordingly as needed.

**Tags:** form, url


---

## 1 answers

### Answer by username_1 on 2017-10-16. Score: 2 | Accepted answer

I'd go with the built in craft functions.
craft.request.getQuery('login')

craft.request documentation here


---

