There must be a better way how to do it but this is what I would do: (Not
tested--just the "idea"...)
Instead of $var1, $var2... I'd use an array for the drop downs thus,
$var[]
$var[]
$var[]
$var[]
Then, check if any is set, then... anyway, this is how it goes:
// from here
$query
Does this fit your idea of a "more elegant solution"?
This is just an enhanced and tested version of the one I posted earlier
(somehow I had time and was curious about it).
$value){ // walk
if ($value != 0){ // make sure the "--- Select ---" is not included
if ($its_set == 1){
Todd came in with a good suggestion which I had started towards, so this is
what I have arrived at for the moment. I will be looking to make this more
elegant soon, but since they are screaming for the report now this is what I
did;
"--- Select ---"){
$usoc[] = $usoc1;
}
I have done this two different ways.
The first involves a function that creates a dropdown from the database.
What is special about this function is that I assign it's own condition as
part of the value for that option. Take this sql statement: select distinct
column_name from the_table
and it wou
4 matches
Mail list logo