0

I have the following form:

<form name="frmSearch" id="frmSearch" action="search_results.html" method="get">
    <table>
        <tr>
            <td><input type="text" id="txtQuery" placeholder="What are you hungry for ?" required="true"></td>
        </tr>
        <tr>
            <td><input type="text" id="txtLocation" placeholder="Your location" required="true">
        </tr>
        <tr>
            <td align="middle"><input type="submit"  placeholder="Let's Eat!" ></td>
        </tr>
    </table>
</form>

When I click on the 'Let's Eat' button(the submit button), URL of the new page launched does not include the values from the two input fields:

http://localhost:8000/search_results.html?

Why is this ?

Jenna Maiz
  • 754
  • 3
  • 15
  • 32

1 Answers1

6

Your inputs need name attributes.

ceejayoz
  • 165,698
  • 38
  • 268
  • 341
  • There are probably dozens of other questions that this could be closed as a duplicate of, but I can't find them. – Barmar Jun 07 '16 at 00:50
  • @Barmar Yeah, I did a brief search but couldn't find the right set of keywords. – ceejayoz Jun 07 '16 at 00:52