Let's say I have this simple form:
<form action="/search/" method="get" role="search">
<input name="cars[]" value="saab">
<input name="cars[]" value="honda">
<input name="cars[]" value="toyota">
<input type="submit" value="submit">
</form>
After clicking submit I am being redirected to the search results page and the URL looks like this: https://example.com/search/?cars=saab%5B%5D&cars=honda%5B%5D&cars=toyota
Questions:
- Why is this piece of code
%5B%5D
added to the url and can I get rid of it? - Why is cars appearing multiple times? Can I simple have
?cars=saab,honda,toyota
?
Thanks