OK, there's your problem. First of all, I'm not a php programmer.
>$colname3_rsMemDir = "-1";
Here you are setting the default value to -1.
>if (isset($_GET['searchStr3'])) {
> $colname3_rsMemDir = $_GET['searchStr3'];
Here you test if the field is set. If it is, you assign it to the variable, otherwise you keep the default value. Problem is that is appears isset() considers the empty string as set. So you really need to test if isset() and not equal to the empty string (!=""). Or consider using the empty() function rather than isset(). Again, I'm not a php programmer so I don't know if one method is better than another.
bregent:
Wanted to get back to you and say thanks again for helping me move forward on this issue. At least you are more of a php expert than I am. You pointed me in the right direction. FYI (and any others who might stumble in, here is what finally worked:
$colname_rsMemDir = "-1";
if ($_GET['searchStr']) {
$colname_rsMemDir = $_GET['searchStr'];
}
$colname2_rsMemDir = "-1";
if ($_GET['searchStr2']) {
$colname2_rsMemDir = $_GET['searchStr2'];
}
$colname3_rsMemDir = "-1";
if ($_GET['searchStr3']) {
$colname3_rsMemDir = $_GET['searchStr3'];
}
mysql_select_db($database_iama_test, $iama_test);
if((!isset($_GET['searchStr']))&&(!isset($_GET['searchStr2']))&&(!isset($_GET['searchStr3']))) {
//this will fetch ALL members who check the include box
//this is the "first load scenario"
$query_rsMemDir = "SELECT * FROM member WHERE member_pub = 1 ";
} else {
$query_rsMemDir = sprintf("SELECT * FROM member WHERE member_pub = 1 AND (lastName like %s OR firstName like %s OR emailLogin like %s) ORDER BY lastName ASC", GetSQLValueString("%" . $colname_rsMemDir . "%", "text"),GetSQLValueString("%" . $colname2_rsMemDir . "%", "text"),GetSQLValueString("%" . $colname3_rsMemDir . "%", "text")); }
I salute you!
-wiz