How does search.php works for this .. Can I have whole project demo as zip.. Thanks!!
My search.php is like this
<?php
//connection information
$host = "localhost";
$user = "root";
$password = "";
$database = "mention_list";
$param = $_GET["term"];
//make connection
$server = mysql_connect($host, $user, $password);
$connection = mysql_select_db($database, $server);
//query the database
$query = mysql_query("SELECT * FROM friends WHERE name REGEXP '^$param'");
//build array of results
for ($x = 0, $numrows = mysql_num_rows($query); $x < $numrows; $x++) {
$row = mysql_fetch_assoc($query);
$friends[$x] = array("name" => $row["name"]);
}
//echo JSON to page
echo json_encode($friends);
mysql_close($server);
?>
But your widget also include trigger with search word eg. @cobol
There is a link to the GitHub project, but that only contains this core jQuery widget. You'll need to implement your own search.php or you can look at my node.js server side example.