Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using a URL to gather the Data Object is not working #39

Open
naguibihab opened this issue Feb 19, 2015 · 2 comments
Open

using a URL to gather the Data Object is not working #39

naguibihab opened this issue Feb 19, 2015 · 2 comments

Comments

@naguibihab
Copy link

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.

@msherax
Copy link

msherax commented Oct 11, 2018

hi, did u fix this issue?

@naguibihab
Copy link
Author

@msherax I can't remember to be honest, probably not if I didn't update the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants