When I get to the step that includes "console.loq(query);" I get "undefined" in the console every time I hit a key in the searchBox. Why is that? Thanks!
very interesting lesson, thank you for the work done by you, but I have one question : how you can identify each element of the list displayed and when you press to have another event, for example, the color of another block??
I have this error: Fatal error: Uncaught Error: Call to undefined method PDO::real_escape_string() in C:xampphtdocstemplateindex.php:7 Stack trace: #0 {main} thrown in C:xampphtdocstemplateindex.php on line 7 line 7: $q = $connection->real_escape_string($_POST['q']); can i help me please. thanks
Thanx for the tutorial. How can I make other input fields react to what one writes in a first input field? Say in Input 1 I enter user ID, and the rest of the Inputs complete with associated info. If someone can help me, I would very much appreciate it!
Thanks for the video. But can't figure out an issue. I am using mod_reroute to route through index.php. Whenever I submit the page in response I get the whole HTML on console (video time: 14:27). Any suggestion would be appreciated.
How can i add keyboard support for the autocomplete ul li List. I want to use the UP and DOWN button and also the ENTER button for Selecting one "Country" this would be very usefulf.
Hi, great channel and tutorials! 🙂 Just a quick question: how would you navigate through the drop down results using your up/down arrows on your keyboard, for example? If you have any video where you explain this, please share a link. Thanks! 🙂
Hey, thanks for adding this tutorial. It is working great. But I have one question. If I want to add another searchBox and I define also 2 searches from database (for example I have table with names and gender), When I put in SELECT FROM table WHERE name LIKE %$q% AND gender=male and in other search gender female I receive back correct search (everything is working) but when I click on one of result both searchBox get the same result. For example I click on searchBox1 on result John both of searchBox fill in with click Result. Can you help me solve this problem.
Hello Senaid. Would that be possible to show data from the column 'name' in a list and div as you already did, AND the column 'id' in a paragraph tag at the same time? I am not trying to waste your time as you must be a very busy person, but what would you recommend me to accomplish that? I reuse your code for my own database successfully, and I wish I would know how to feed two different HTML elements with data from two different columns. If I learn it I would probably know how to add more if necessary. Thank you! PS. Please, don't need to answer me if you're busy or for any other reason. 🙂
Hey Senaid. Thanks for your awesome tutorials! You just earned a new subscriber and likes to your videos. Just to let you know the email I received from you is not showing the link to the source code.
I have done your lesson. But at step connection, i used: "$tenmaychu='localhost'; $tentaikhoan='root'; $pass=''; $csdl='khonha'; $conn=mysql_connect($tenmaychu,$tentaikhoan,$pass,$csdl) or die('Không kết nối được!'); mysql_select_db($csdl,$conn); $q=mysql_real_escape_string($_POST['q']); $sql = "select name from tinhthanh where name like '%$q%'"; $run=mysql_query($sql); if(mysql_num_rows($run) >0) {… follow your step, my laptop annouced errors many times.
32 responses to “jQuery Tutorial: jQuery Autocomplete With Ajax & PHP & MySQL”
Hii Senaid!!!! Thanks, You are the Awesome!!
When I get to the step that includes "console.loq(query);" I get "undefined" in the console every time I hit a key in the searchBox. Why is that? Thanks!
Hi, the condition if ($sql->num_rows >0) are giving me a Notice: Trying to get property of non-object in…. What can I do?
Thanks, You are the man !!! 🙂
Just what I was looking for… thanks!
very interesting lesson, thank you for the work done by you, but I have one question : how you can identify each element of the list displayed and when you press to have another event, for example, the color of another block??
Good my Teacher i am from uganda
I have this error:
Fatal error: Uncaught Error: Call to undefined method PDO::real_escape_string() in C:xampphtdocstemplateindex.php:7 Stack trace: #0 {main} thrown in C:xampphtdocstemplateindex.php on line 7
line 7: $q = $connection->real_escape_string($_POST['q']);
can i help me please. thanks
I really like the way you explain things. You are a great developer. Great Work.
Kindly make a tutorial about jQuery Autocomplete plugin also.
Thanx for the tutorial. How can I make other input fields react to what one writes in a first input field? Say in Input 1 I enter user ID, and the rest of the Inputs complete with associated info. If someone can help me, I would very much appreciate it!
i like you man
How to limit number of listed results on drop down menu
Hey Senaid, I've tried to download your code but after I input my email, I don't receive anything.
i have a question what if you type a string and you erase the string ? the list will be there or it will disappear?
Thanks for the video. But can't figure out an issue. I am using mod_reroute to route through index.php. Whenever I submit the page in response I get the whole HTML on console (video time: 14:27). Any suggestion would be appreciated.
Hii Senaid, wonderful tuts, Thank you & love from India, You earned me as ua new subscriber 🙂
Hi Senaid. Thanks for your amazing TUT's 😉 !
I've one Question:
How can i add keyboard support for the autocomplete ul li List.
I want to use the UP and DOWN button and also the ENTER button for Selecting one "Country" this would be very usefulf.
Thank's
Yours is one of the best and well described tutorials on this topic. May god bless you!
Thanks for your awesome tutorial!
Hi, great channel and tutorials! 🙂 Just a quick question: how would you navigate through the drop down results using your up/down arrows on your keyboard, for example? If you have any video where you explain this, please share a link. Thanks! 🙂
your source code does not work, as in you get an email but no link to teh source code
$(document).on('click', 'li', function () {
var sire = $(this).text();
$("#sire").val(sire);
$("#sireList").html("");
});
ako imaš dva ili više inputa sve ti onclick zapuni sa istim value. Jel je možda krivo to da treba onclick function dat neko ime?
istalo mi sve radi, samo onclick treba da rješim.
it works.. thank u thank u thank u
I really appreciate your thorough explanation of the technologies used. Well done.
Hey, thanks for adding this tutorial. It is working great. But I have one question. If I want to add another searchBox and I define also 2 searches from database (for example I have table with names and gender), When I put in SELECT FROM table WHERE name LIKE %$q% AND gender=male and in other search gender female I receive back correct search (everything is working) but when I click on one of result both searchBox get the same result. For example I click on searchBox1 on result John both of searchBox fill in with click Result. Can you help me solve this problem.
Hello Senaid. Would that be possible to show data from the column 'name' in a list and div as you already did, AND the column 'id' in a paragraph tag at the same time? I am not trying to waste your time as you must be a very busy person, but what would you recommend me to accomplish that? I reuse your code for my own database successfully, and I wish I would know how to feed two different HTML elements with data from two different columns. If I learn it I would probably know how to add more if necessary. Thank you! PS. Please, don't need to answer me if you're busy or for any other reason. 🙂
Hey Senaid. Thanks for your awesome tutorials! You just earned a new subscriber and likes to your videos. Just to let you know the email I received from you is not showing the link to the source code.
I have done your lesson. But at step connection, i used:
"$tenmaychu='localhost';
$tentaikhoan='root';
$pass='';
$csdl='khonha';
$conn=mysql_connect($tenmaychu,$tentaikhoan,$pass,$csdl) or die('Không kết nối được!');
mysql_select_db($csdl,$conn);
$q=mysql_real_escape_string($_POST['q']);
$sql = "select name from tinhthanh where name like '%$q%'";
$run=mysql_query($sql);
if(mysql_num_rows($run) >0) {…
follow your step, my laptop annouced errors many times.
Pleasure seeing the tutorials. Thank you
the boss, love you from tunsia
keep going
Genial Eres un Maestrazo Felicidades!!! Gracias por el aporte