Skip to content Skip to sidebar Skip to footer

Select Option To Update Second Select Option Based On Mysql Populated Dropdowns

I am trying to create a smart form which will automatically limit the options available of a second drop down box. Background: I am creating a ticketing system and I would like for

Solution 1:

You need AJAX, it's a combination of PHP and JS. ( javascript request data from the server, php processes the request, returns data ).

You would need to practice AJAX a bit to understand how to make this select box.

This is process in theory:

  1. You output your first select box with PHP.
  2. Make an onchange event handler for it that would call a server for information.

    ..options..

  3. This updateNewDropDown function will take the value form a server response you selected and fetch the new data via PHP for the second select menu, and create the new select menu with the data AJAX response provided.

AJAX TUTORIALS:

http://api.jquery.com/jQuery.ajax/http://www.w3schools.com/ajax/default.asp

Post a Comment for "Select Option To Update Second Select Option Based On Mysql Populated Dropdowns"