I'm testing a search field that sends what the user types directly to the site I've chosen (on a new tab), searching the site itself, and works perfectly. However, I would like to know if I can manipulate this address that is sent to the url.
For example (searching for Youtube): If the user types "best serials" in the form, and press Enter, the form completes the action with the name (q) and search term and sends it to the url. Staying: link ? Q = best + serials
In this way I wanted him to send the url without the "name" and "?", only with "/" and the search term, as if it were a normal link. Example: link / best + serials
Does anyone know if there is any way to handle this with php or javascript?
Follow the form code:
<form name="searchfield" method="get" action="http://www.youtube.com/results" target="_blank">
<input type="text" id="input" name="q" autocomplete="off" maxlength="100" size="36" placeholder="Pesquise no YouTube">
<input type="image" id="search" name="btnG" src="img/search.png">
</form>