Home >Backend Development >PHP Tutorial >How does PHP fuzzy query transfer the search keywords to the URL?
<code><form method="post" action="<{url c='main' a='search'}>"> <input type="text" name="kw" class="search_text fl" placeholder=""> <input type="submit" class="search_btn fr" value="搜 索"> </form></code>
Now the fuzzy query looks like this localhost/main/search.html
If you want to achieve this effect localhost/main/search.html?kw="keyword"
The principle of transferring the kw value to the url What’s it like
<code><form method="post" action="<{url c='main' a='search'}>"> <input type="text" name="kw" class="search_text fl" placeholder=""> <input type="submit" class="search_btn fr" value="搜 索"> </form></code>
Now the fuzzy query looks like this localhost/main/search.html
If you want to achieve this effect localhost/main/search.html?kw="keyword"
The principle of transferring the kw value to the url What’s it like
If you change the form method to get, you will have the effect you want