Reputation: 441
I have a file named draft.html with a simple GET form redirecting to itself like that:
<!DOCTYPE html>
<html>
<body>
<form action="draft.html" method="GET">
<input type="text" id="test">
<button type="submit">Valid</button>
</form>
</body>
</html>
When I type something and click on Valid
it redirects to draft.html
but without the test
parameter in the URL. What am I doing wrong?
Thank you for your help.
Upvotes: 0
Views: 72
Reputation: 462
You need to add a name
attribute to your inputs (the id
is unnecessary here unless you have related JavaScript or CSS files that use it):
<input type="text" name="test" id="test">
Upvotes: 1