You can't use die() like that. In fact, I don't really like die() all that much. It takes control away from the user.
$query = mysql_query("SELECT en_route, stop_code, stop_name, neighborhood, miles_2next, elapse_2next, mins_2main, near_transfer, fare_free, remarks FROM h_stops WHERE (en_route=".$_POST['stopsel'].") AND (stop_name IS NOT NULL)", $conn);
if($err=mysql_error($conn)){
// you can do anything in here.
// you only need to check for an error here
// if there is not one here, mysql_num_rows
// will not be returning one either.
trigger_error($err, E_USER_ERROR);
}
$rows = mysql_num_rows($query);
if ($rows > 0) {
// do this
} else { // its either greater than 0 or its not.
// do something different
}
Brian Moon
Phorum Dev Team
http://phorum.org/
-----------------------
dealnews.com - How to go broke saving money.
http://dealnews.com/