I have tried using the library to preview emails when someone is filling in a form to send emails:
$("#email").autoSuggest("http://www.ctarsplatform4.com/sherwood_DevTest/get_course_list.php?action=sendIRemail", {minChars: 2, matchCase: true, selectedItemProp: "email", searchObjProps: "email"});
And what I am calling is:
elseif(isset($_GET['action']) && $_GET['action'] == 'sendIRemail'){$input = $_GET["q"];$data = array();// query your DataBase here looking for a match to $input$query = mysql_query("SELECT * FROM cms_external_email WHERE email LIKE '%$input%'");while ($row = mysql_fetch_assoc($query)) {$json = array();$json['email'] = $row['email'];$data[] = $json;}header("Content-type: application/json");echo json_encode($data);}
But I am getting nothing back and the search is not working. Please help.
I have tried using the library to preview emails when someone is filling in a form to send emails:
$("#email").autoSuggest("http://www.ctarsplatform4.com/sherwood_DevTest/get_course_list.php?action=sendIRemail", {minChars: 2, matchCase: true, selectedItemProp: "email", searchObjProps: "email"});
However I called this link on its own (http://www.ctarsplatform4.com/sherwood_DevTest/get_course_list.php?action=sendIRemail) and I can see that it's returning some results.
And what I am calling is:
elseif(isset($_GET['action']) && $_GET['action'] == 'sendIRemail')
{
$input = $_GET["q"];
$data = array();
// query your DataBase here looking for a match to $input
$query = mysql_query("SELECT * FROM cms_external_email WHERE email LIKE '%$input%'");
while ($row = mysql_fetch_assoc($query)) {
$json = array();
$json['email'] = $row['email'];
$data[] = $json;
}
header("Content-type: application/json");
echo json_encode($data);
}
But I am getting nothing back and the search is not working. Please help.