Would you try an experiment? In this line: $sql = ("SELECT * FROM evdobanding WHERE Market like '%$term' and Cell_Sect = '$term2' and Date = '$term3' ORDER BY distance asc"); Change to: $sql = "SELECT * FROM evdobanding WHERE Market like '%".$term."' and Cell_Sect = '".$term2."' and Date = '".$term3."' ORDER BY distance asc"; That is, remove the parenthesis and concatenate the variables into the string. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php