Reputation: 244
I am wondering if anyone can help
I am trying to use a form with the get
function, however not having much luck.
Here is my code
<div class="row-fluid search-forms search-default">
<form class="form-search" method="get" action="search_results.php">
<div class="chat-form">
<div class="input-cont">
<input type="text" placeholder="Search..." class="m-wrap" />
</div>
<button type="button" class="btn green">Search <i class="m-icon-swapright m-icon-white"></i></button>
</div>
</form>
</div>
The search is taking me to the right page but with nothing after ?q=
Any idea?
Upvotes: 1
Views: 61
Reputation: 127
You haven't provided your input a name. So, it has nothing to add to the GET. add attribute name="" to the tag.
Upvotes: 3
Reputation: 562
You have to add name="q":
<input type="text" placeholder="Search..." name="q" class="m-wrap" />
Upvotes: 2