0

i need help, i want to create a smart auto complete using a text box, it fill clients names from client database, is it any way to create those without jquery, thanks

2
Contributors
3
Replies
20
Views
1 Year
Discussion Span
Last Post by cereal
0

to cereal, thanks for yur response, but what i mean is, how to create it, whithout using jquery,
to be honest, i never used Jquery, can u show me how to use , or plug the jquery to php, many thanks

0

In short you need a script that can receive a GET request, filter it and use it to perform a query, in which case would be something like:

SELECT `last_name` FROM `clients` WHERE `last_name` LIKE 'LETTER%' ORDER BY `last_name`, `first_name` LIMIT 10;

Where 'LETTER%' would be a placeholder for a prepared statement, i.e. this :last_name and defined in PHP as:

$data[':last_name'] = $input . '%';

See:

I prefer autocomplete.js as with JQuery you have to add the UI library and what followes: styles, images and more code, but it's your choice:

Have you tried something? If affirmative, paste it here, so we can suggest you how to continue, if needed.

Edited by cereal

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.