SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ajax to display a database as list?

    I think I've seen examples of this - can anyone suggest a way to use ajax to display a list from a database? (my server is php enabled).
    /// communicate.motivate - www.forge104.com ///

  2. #2
    Non-Member
    Join Date
    Jan 2011
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Get AJAX to send a request to a php script when a specified event occurs.

    The php script then retrieves the required records from the database using mysql_query.

    Loop through the returned records in the php script and generate the html for the list - a <select>, <ul>, <ol> or some other list (you didn't specify the type of list)

    The AJAX function then receives the html returned by the php script.

    Output the returned html to your web page.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •