Home >Backend Development >PHP Tutorial >How does PHP fuzzy query transfer the search keywords to the URL?

How does PHP fuzzy query transfer the search keywords to the URL?

WBOY
WBOYOriginal
2016-07-06 13:52:041035browse

<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

Reply content:

<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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn