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).
?php
if (isset($_POST['var'])){ // if POSTed
// initial query
// make sure "WHERE" not included when none is
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
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;
?php
if($usoc1 "--- Select ---"){
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
4 matches
Mail list logo