Auto Complete ไม่เจอภาษาไทย ตอนเวลา txtsearch query ภาษาอังกฤษได้ครับ
ดู โค้ดหน่อย หรือรูป
Date :
2011-09-13 21:32:59
By :
tormam
Code (PHP)
</body>
</html>
connect server
<?php
// Change the following to suit your own installation:
$host = "localhost";
$database = "Autocomplete";
$user = "root";
$password = "5116";
// You don't have touch a thing from here on unless you really want to:
mysql_connect($host,$user,$password);
mysql_select_db($database);
$sql ="SELECT title FROM autocomplete_demo WHERE title LIKE '%".$_POST["search"]."%'";
$rs=mysql_query($sql);
?>
<ul>
<?
while($result=mysql_fetch_array($rs))
{
?>
<li><? echo $result["title"];?></li>
<?
}
?>
ประวัติการแก้ไข 2011-09-14 06:22:34 2011-09-14 06:23:26
Date :
2011-09-13 21:37:02
By :
โต้ง
<?php
// Change the following to suit your own installation:
$host = "localhost";
$database = "Autocomplete";
$user = "root";
$password = "5116";
// You don't have touch a thing from here on unless you really want to:
mysql_connect($host,$user,$password);
mysql_select_db($database);
$sql ="SELECT title FROM autocomplete_demo WHERE title LIKE '%".$_POST["search"]."%'";
$rs=mysql_query($sql);
?>
<ul>
<?
while($result=mysql_fetch_array($rs))
{
?>
<li><? echo $result["title"];?></li>
<?
}
?>
</ul>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Autocomplete demonstration</title>
<? include('mod_ctrl_autocompletejs.php'); ?>
<style>
body {font-family: verdana; arial, sans-serif; font-size: 12px; }
ul { padding: 3px; width: 150px; border: 1px solid #999;
font-family: verdana; arial, sans-serif; font-size: 12px;}
ul { list-style-type: none; font-family: verdana; arial, sans-serif; font-size: 12px; margin: 5px 0 0 0}
li { margin: 0 0 5px 0; cursor: default; color: red;}
li:hover { background: #ffc; }
</style>
</head>
<body>
<h2>Autocompletion example</h2>
<div>
<label>Type here</label> <input type="text" id="search" name="search" value="" style="background:#999999">
</div>
<div id="hint"></div>
<script type="text/javascript">
new Ajax.Autocompleter("search","hint","server.php");
</script>
</body>
</html>
ประวัติการแก้ไข 2011-09-14 06:28:09 2011-09-14 06:29:23
Date :
2011-09-14 06:25:51
By :
โต้ง
ให้ได้ภาษาไทย แก้อย่างไรค่ะ
Date :
2018-09-14 14:11:22
By :
Nattarika
วาง Code เฉพาะที่มีปัญหาพอนะครับ
Date :
2018-09-14 17:47:21
By :
mr.win
Load balance : Server 02