时间:2021-07-01 10:21:17 帮助过:23人阅读
//require('common.inc.php');
//require('config.inc.php');
mysql_connect('localhost', 'root' ,'123456');
mysql_select_db("hxyjw_20100416");
mysql_query("SET NAMES GBK");//防止数据库交互时乱码
header('Content-Type:text/html;charset=gbk');
$queryString = $_POST['queryString'] ;
if(strlen($queryString) >0) {
$sql= "SELECT username FROM phpcms_member WHERE username LIKE '".$queryString."%' LIMIT 0,15";
echo $sql;
$query = mysql_query($sql);
while ($result = mysql_fetch_array($query))
{
$value=$result['username'];
echo '
Ajax搜索功能