article

Thursday, April 8, 2010

Facebook like Autosuggestion with jQuery, Ajax and PHP

Facebook like Autosuggestion with jQuery, Ajax and PHP







Facebook like Auto suggestion







Facebook like Auto suggestion














Search.php

$mysql_hostname = "localhost";
$mysql_user = "root";
$mysql_password = "ednalan";
$mysql_database = "insurance_site";
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect database");
mysql_select_db($mysql_database, $bd) or die("Could not select database");

if($_POST)
{
$search=$_POST['searchword'];
$sql_res=mysql_query("select * from rme_insurance_agent where profile like '%$search%' or name like '%$search%' order by id LIMIT 10");
while($row=mysql_fetch_array($sql_res))
{
$name=$row['name'];
$img=$row['photo'];
$country=$row['country'];
?>






}
}
?>



Download

http://dl.dropbox.com/u/3293191/Facebook%20like%20Autosuggestion%20with%20jQuery%2C%20Ajax%20and%20PHP.zip

Related Post