I don’t know how to put it exactly, so here goes.
I’ve created a search bar on my webpage that uses your input text to search another website.
This is what I’ve got (things have been censored):
<form name="search" class="form-search" method="get" action="http://www.nameofwebsite.com/search.php?">
<input name="searchbynum" type="text" class="search-query input-large" onkeypress="return submitenter(this,event)">
<button type="submit" class="btn btn-primary">Search</button>
</form>
When searching on the actual website, the search URL looks like this:
http://www.nameofwebsite.com/search.php?searchbynum=search+phrase&searchbydesc=&Submit=Go
Where “search+phrase” is what is searched. To get to the point,
What would I have to do to add the “&searchbydesc=&Submit=Go” at the end of the search?
Add hidden fields to your page.
Note that your HTML as it is, is invalid. A
<form>element cannot have<input />elements as immediate children, they must be wrapped in a<div>or<fieldset>or other similar elements.