Hi Codegirl,
I have the suspicion that uyou have register_globals set to on. Otherwise the code you posted WON't work properly. Because you are retrieving $states from the $_GET array:
$states = trim($_GET["states"]);
I pointed out the problem to you. You overwrite the $states variable in your query. The reason your fix works, is because now a different value holds the selected value, namely, $state. Still, I recommend you kepping a less similar coding convention. It will safe you a lot of headaches.
J.
PS: Please remember I was trying to help you write better code. you came for help. Don't be arrogant, and look at what I wrote. It will safe you a lot of coding trouble