我在 html 中有一个组合框,我希望通过操作它来显示来自数据库的数据,如果数据库结果有 abc/cde/etc 并且用户输入这些都将显示我通过 jquery 执行此操作但找不到动态方式到 paas 值..
enter code here
<?php
// Connects to your Database
$connection=mysql_connect("localhost","root","");
$db="kukreja";
mysql_select_db($db,$connection) or die("could not open $db");
$sql="SELECT*FROM add_item";
$result=mysql_query($sql,$connection) or die("could not execute sql:$sql");
$num_result=mysql_fetch_Array($result);
?>
<script type="text/javascript">
jQuery(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
});
});
</script>