I'm building a multipage form for an online experiment, which will involve showing different versions of the questions to different users. Is there a simple way to create page sequences that incorporate different combinations of the page files? Say I have these files: `1A.php` and `1B.php` (page 1); `2A.php` and `2B.php` (page 2); `3A.php`, `3B.php`, `3C.php`, `3D.php`, `3E.php` and `3F.php` (page 3) and so on, how would I go about creating a set of unique navigation paths? For instance, one might be [`1A.php` -> `2B.php` -> `3E.php` -> `4B.php`] while another is [`1A.php` -> `2B.php` -> `3A.php` -> `4C.php`]. (I'm new to PHP so I suspect this might not be the most sophisticated way of doing things, but I'm happy as long as something works.) Each page has an `<input type="submit">` button and connects to a database via a separate PHP file.

The idea is to randomly redirect users from the start page to one of the (12) preset sequences.

Any suggestions?

**Edit**: The objective here is not to generate *every* possible set of questions. To clarify, the objective is to specify 12 of the possible page combinations (for reasons to do with the experimental design). The questionnaire will have a start page, and from here I'd like to redirect respondents to one of 12 branches.