D
Dieter
Hi,
here I'd like to ask for your advice how to
generally code a certain task, not for the details.
O.K.- I try to express myself clearly:
* There's a HTML-form from which the user can choose
many different options (about 15) simultanously in
all possible combinations for a variable number of items
(batch mode).
So e.g. lets say, she can enter "apple, peach, cherry"
and request "color, taste, shape, short description"
out of a set of many other options.
* The CGI-script constructs a statement, depending on the desired
information and queries the MySQL database.
* Depending on what kind of information was requested,
the output from the database is formatted differentially
(headers, linebreaks ... ) and sent to the user.
Now, the system already runs fine just for a few options.
But with a about 15 options in different combinations
I don't want to end up with endless numbers of "if"-clauses.
Do you know a elegant solution, how to manage all the
different optional parameters ?
The problem appears on three stages:
* Parsing the POST data (request)
* Constructing the query for the database
* Handling the output
Maybe there are Perl modules to faciliate this kind of task ?
Dieter
here I'd like to ask for your advice how to
generally code a certain task, not for the details.
O.K.- I try to express myself clearly:
* There's a HTML-form from which the user can choose
many different options (about 15) simultanously in
all possible combinations for a variable number of items
(batch mode).
So e.g. lets say, she can enter "apple, peach, cherry"
and request "color, taste, shape, short description"
out of a set of many other options.
* The CGI-script constructs a statement, depending on the desired
information and queries the MySQL database.
* Depending on what kind of information was requested,
the output from the database is formatted differentially
(headers, linebreaks ... ) and sent to the user.
Now, the system already runs fine just for a few options.
But with a about 15 options in different combinations
I don't want to end up with endless numbers of "if"-clauses.
Do you know a elegant solution, how to manage all the
different optional parameters ?
The problem appears on three stages:
* Parsing the POST data (request)
* Constructing the query for the database
* Handling the output
Maybe there are Perl modules to faciliate this kind of task ?
Dieter