How to fetch and display the records of various fields from database on the click of records of one field fetched from database with the help of ajax?

Posted on 2009-04-28
Last Modified: 2012-05-06
can u help me with the simple ajax application in which i am showing records of 1 field from database and on the click of that , its details are shown with ajax.
Question by:designersx
    LVL 5

    Accepted Solution

    I once wrote a very simple ajax script that should help you get started.

    All you would go is modify the php file to return your results from your database instead of what the example is returning. This is the most simple ajax tutorial I know of:

    The script can take whatever if types into those fields and can do anything in php with it. So if you type a 1 you could make it look up record #1 in your database. If you type a name you can have it look up the name and return the results.

    Let me know what specific questions you have about getting your script to work and I'll be glad to help.

    Author Comment

    sir this is not i want.

    i am saying that i have a database, suppose there are 2 fields.
    name    age

    yogesh  23
    deepak  27

    on the front end,
    deepak are shown, when i click on yogesh 23 is shown, when i click on deepak 27 is shown with ajax.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
    I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now