Show us all the code you chopped out, or at least every single line that mentions $pass_category. Or, faster for you to figure it out: Echo out $pass_category immediately before the if () statement. I'm betting you set it accidentally in the other code. > if ($pass_category > "") $sql2 = $sql2 . " and cat = '$pass_category' "; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]