I need to pass a value from a form to an external php script via a url, but my code isn't working. When I submit my form, I'm expecting the url to look like this: example.com/script.php?zip=12345 but what I'm getting is this: example.com/script.php? with nothing after the ?. My form code is below. Am I doing something wrong, or do I need to change a setting somewhere?

        <form id="map" method="get" action="script.php">
            <input type="text" class="inline" id="zip" />
            <input type="submit" class="button" value="Go" />
  • 1
    I would say that this is not an ExpressionEngine-related question and is better server by StackOverflow. Commented Dec 18, 2012 at 16:54

1 Answer 1


You're missing the name attribute on the text field.

<input type="text" class="inline" id="zip" name="zip" />

You may just want to change id to name (that would depend on whether or not you're using the ID for any CSS/jQuery selectors).

  • Doh! I must have looked at that code 100 times and not noticed that there was no name. Thanks.
    – artmem
    Commented Dec 18, 2012 at 16:54
  • No problem. For future reference Derek is right though. Any non-EE questions would be better off posted on Stack Overflow.
    – Dom Stubbs
    Commented Dec 18, 2012 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.