Its a relatively simple thing to do...
$sql = "SELECT * FROM table WHERE field1 = 'green' AND field2 = 'plastic'";
If (IsSet($height)) {
$sql .= " AND height < ". $height
}
If (IsSet($width)) {
$sql .= " AND width < ". $width
}
Then execute your sql and whala!
-Shea