Please help Nyuba. I was looking for information, but really did not find anything.

The question is the following. I need to create a questionnaire (form). For example, I have the first field in which I must enter a value. As input is checked, the data is entered correctly. For example, 6 options. If the correct option is entered, then for each of the 6 options, it is proposed to choose your list of valid options as a drop-down list. Then you can again the same, for example, for each of the options for the drop-down list is another list. Implemented here http://www.nvidia.ru/Download/index.aspx?lang=ru

When all the fields are filled, the tooltip comes up with instructions, and below it is sent for processing to php, where php writes data to the database. (Processing and recording is not difficult, as I know, help with the substitution of options depending on the previous answer.)

I would be very grateful for the advice.

    2 answers 2

    Action direction.
    Option One:
    Create a tree of various options, such as:

    $tree = new Array(); $tree['firstStringFirstInput'] = new Array(); $tree['firstStringFirstInput']['firstStringSecondInput'] = new Array(); $tree['secondStringFirstInput'] = new Array(); 

    etc. Then from this array we get values.

    Option two (as in n-views): After each change of the input, we make an ajax request, in which we transfer the name of the input and its value. Depending on this, we create a SELECT query to the database with uploading values ​​for the next form input.

      this is ajax // better look for jQuery ajax php validation