Title: put a variable in a query string?
Last modified: August 21, 2016

---

# put a variable in a query string?

 *  [gerard](https://wordpress.org/support/users/charismaarts/)
 * (@charismaarts)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/put-a-variable-in-a-query-string/)
 * Hey Guys: I am hoping someone can help me – this is something I am positive I
   have done before and just cannot remember the proper syntax. What i want to do
   is have two variables; lets say $q1 and $q2; and I want to pass those to a page
   using a query string; so I would have: [http://mydomain.com/?q1=xx&q2=xx](http://mydomain.com/?q1=xx&q2=xx)
 * I do not know how to put the $variables in where the “xx”s are; i am sure there
   is a way to do this but cannot find it for the life of me!
 * thanks, g

Viewing 1 replies (of 1 total)

 *  [Rajesh Soni](https://wordpress.org/support/users/rajeshsoni/)
 * (@rajeshsoni)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/put-a-variable-in-a-query-string/#post-3849139)
 * How about this?
 *     ```
       <form metdhod='get'>
       <input type='text' name='q1' value='XX'><br/>
       <input type='text' name='q2' value='YY'><br/>
       <input type='submit'>
       </form>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘put a variable in a query string?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Rajesh Soni](https://wordpress.org/support/users/rajeshsoni/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/put-a-variable-in-a-query-string/#post-3849139)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
