SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to show information by selecting one of the items of drop down list

    I have a select tag that contains category of educational courses.
    when the user selects any of items of category, he/she can see the list of information about category.
    of course all of the information are read from database.
    I really appreciate for your help

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2013
    Location
    Voorheesville NY USA
    Posts
    88
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    And I'm guessing your question is: How do I get the appropriate info about the selected category to the client?

    1 - use JS to submit the form containing the select tag and a let php take the value of the select and re-send the page with the info you want added to it.

    2 - use JS to submit an ajax request to do the same thing, but instead of a refresh of the page with php, JS gets the ajax response and populates the screen with the retrieved info.

  3. #3
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much, can you bring me an example?

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2013
    Location
    Voorheesville NY USA
    Posts
    88
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The JS part can be avoided if you let the user make a selection and then hit a 'submit' button. Then it's simple php/sql code. I'll let you take a stab at it first.


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
  •