I'm a beginner and trying to generate as much of my own code as possible without just constantly asking others to write it for me, so with regard to this question I'm looking for hints in the right direction, rather than outright working examples. You people are all very talented, but I learn best if I reason it out myself. Should I hit a brick wall, I'll be sure to ask specifics. :-)
I want to build a form for MySQL query that has a rather lot of checkbox options, not all of which most users would be interested in at one time for one search. Rather than present a massive form, I'd like the first few options to control how many of the subsequent choices are available to select from, without going to a new page (if possible).
Hypothetical example: a database of movie actors, wherein each actor's nationality is included, and by choosing an assortment of actors the form query will return all movies they appear in together.
ACTOR NATIONALITY
[] Any
[] German
[] Russian
[] British
[] American
[] Japanese
[] Chinese
at first no further information is displayed. Should the user check [] Any
then the full form is revealed:
German Russian British American Japanese Chinese
[]GER1 []RUS1 []BRIT1 []AMER1 []JPN1 []CHN1
[]GER2 []RUS2 []BRIT2 []AMER2 []JPN2 []CHN2
[]GER3 []RUS3 []BRIT3 []AMER3 []JPN3 []CHN3
etc.
but if the user is only interested in say, German & Japanese actors, he would check those two boxes and the following would then appear below:
German Japanese
[]GER1 []JPN1
[]GER2 []JPN2
[]GER3 []JPN3
am I making sense?
My coding knowledge at this point is confined to PHP/MySQL, so a solution that only incorporates PHP would be ideal, but if javascript is required please point me in the right direction and I will endeavor to add the necessary knowledge!
Thank you!
EDIT - yes, all the checkbox info is being pulled from a database