如何整合搜索结果,如图所示?现在我有:
if(isset($_POST['q'])) {
$q = $_POST['q'];
$select = $db->query("SELECT * FROM customers WHERE FName LIKE '%$q%' OR
LName LIKE '%$q%' ORDER BY ID DESC");
//Search Form Box
<form method="post">
<input type="text" name="q" /> <input type="submit" name="search" />
</form>
我想要的最终结果是能够键入表单搜索字段,在键入前3个字符后,可以选择表单并从我的“items”数据库表中填充,并且可以选择。我希望能够 动态添加额外的表单字段(以便用户可以将项目添加到发票中)。
自动填充代码:
'$(function() {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$( "#tags" ).autocomplete({
source: availableTags
});
});'
我无法看到自动完成功能如何使用有限的标签代码。
答案 0 :(得分:1)