jQuery, Ajax and PHP For Facebook like Autosuggestion

Facebook like Autosuggestion user search with jQuery, Ajax and PHP. It’s simple and clean just you have to change the database details.

Download the Script. Edit Config.php change the database details.

Database

create database table with name “test_user_data”
CREATE TABLE test_user_data
(
uid INT AUTO_INCREMENT PRIMARY KEY,
fname VARCHAR(25),
lname VARCHAR(25),
country VARCHAR(25),
img VARCHAR(50)
);

Auto.html

contains jquery(javascript) and HTML Code. Take a look at input field class valuessearch
<script type=”text/javascript” src=”jquery.js”></script>
</script>
$(document).ready(function(){
$(“.search”).keyup(function()
{
var searchbox = $(this).val();
var dataString = ‘searchword=’+ searchbox;
if(searchbox==”)
{}
else
{
$.ajax({
type: “POST”,
url: “search.php”,
data: dataString,
cache: false,
success: function(html)
{
$(“#display”).html(html).show();
}
});
}return false;
});
});
</script>

<input type=”text” class=”search” id=”searchbox” />
<div id=”display”>
</div>

Download Files

Advertisements

18 thoughts on “jQuery, Ajax and PHP For Facebook like Autosuggestion

  1. Heya i am for the primary time here. I found this
    board and I in finding It really helpful & it helped me out a lot.
    I am hoping to give one thing back and aid others such as you aided me.

    Like

  2. Hello! This post couldn’t be written any better! Reading through this post reminds me of my old room mate! He always kept chatting about this. I will forward this write-up to him. Fairly certain he will have a good read. Many thanks for sharing!

    Like

  3. This is my first time pay a quick visit at
    here and i am in fact impressed to read all at one place.

    Like

  4. I was excited to find this website. I wanted
    to thank you for ones time for this fantastic read!! I definitely loved every
    bit of it and i also have you bookmarked to look at new information in your web
    site.

    Like

  5. Thanks for another informative site. Where else could I am getting that type of
    info written in such an ideal manner? I’ve a undertaking that I am simply now operating on, and I have been on the glance out for such information.

    Like

  6. I visited various web pages however the audio feature for
    audio songs present at this web site is truly superb.

    Like

  7. I wanna say thanks for publicing this correct information. Keep up this great job. I’ll subscribe to your site also. Thnx!

    Like

  8. Hi there! Do you use Twitter? I’d like to follow you if that would be okay. I’m definitely enjoying your blog and look forward
    to new updates.

    Like

  9. Everyone loves what you guys are usually up too.

    This kind of clever work and coverage! Keep up the terrific works guys I’ve added you guys to blogroll.

    Like

  10. What’s up Dear, are you genuinely visiting this web page daily, if so after that you will definitely take nice know-how.

    Like

  11. Hi, Neat post. There is a problem with your web
    site in web explorer, may check this? IE still is the market
    chief and a large component of people will pass over your
    fantastic writing due to this problem.

    Like

  12. Generally I don’t learn article on blogs, however I would like to say that this write-up very forced me to try and do so! Your writing taste has been surprised me. Thank you, very nice post.

    Like

  13. Greetings! This is my 1st comment here so I just wanted to give a quick shout
    out and say I genuinely enjoy reading through your posts.
    Can you recommend any other blogs/websites/forums that deal with the same topics?
    Thank you!

    Like

  14. Thanks for ones marvelous posting! I seriously enjoyed reading it, you’re a great author.I will be sure to bookmark your blog and will eventually come back later on. I want to encourage you continue your great writing, have a nice evening!

    Like

  15. Very nice post. I just stumbled upon your blog and wished to say
    that I have truly enjoyed surfing around your blog posts. In any case
    I will be subscribing to your feed and I hope you write again very soon!

    Like

  16. This article will help the internet visitors for creating new blog or even
    a weblog from start to end.

    Like

  17. WOW! Amazing and well deserved.

    Like

  18. Can I simply just say what a comfort to uncover a person that actually understands what they’re discussing on the internet.
    You actually understand how to bring a problem to light and make it important.
    A lot more people must check this out and understand this side of the story.

    I was surprised that you aren’t more popular since you definitely possess the gift.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s