【发布时间】:2014-04-29 02:11:58
【问题描述】:
我开发 Web 应用程序,其中包含搜索引擎。我从数据库中读取数据。我建立了可以帮助完成单词的搜索引擎,但需要帮助纠正拼写,例如我写的拼写这个单词是错误的引擎 。请帮助我看到了很多链接,但找不到正确的解决方案。
<h2>Search</h2>
<form name="search" method="post" action="<?=$PHP_SELF?>">
Seach for: <input type="text" name="find" /> in
<Select NAME="field">
<Option VALUE="fname">diseasename</option>
<Option VALUE="lname">genename</option>
</Select>
<input type="hidden" name="searching" value="yes" />
<input type="submit" name="search" value="Search" />
</form>
</html>
<?php
//This is only displayed if they have submitted the form
if ($searching =="yes")
{
echo "<h2>Results</h2><p>";
//If they did not enter a search term we give them an error
if ($find == "")
{
echo "<p>You forgot to enter a search term";
exit;
}
【问题讨论】:
标签: php jquery mysql search autocorrect