$number_of_records=mysql_query("SELECT * FROM details WHERE category2='south' and price = BETWEEN '$pricerangel' and '$pricerangeh'");
$number_of_records_in_table = mysql_num_rows($number_of_records);
and it gives: Warning: Supplied argument is not a valid MySQL result resource in etc etc. It's the BETWEEN statement thats causing the trouble but the mysql manual doesn't make the syntax clear to me. I'm a bit lost here.
remove the equal sign before the BETWEEN keyword, and if the price column is defined numeric, you'll probably want to remove the single quotes from the price range amounts (i believe mysql lets you get away with it, but mysql is notoriously liberal with its syntax)