include "sql.inc";
function show_list()
{
global $low_cr,$high_cr,$type;
$query = "SELECT * from monsters35 where challenge_rating >= $low_cr and challenge_rating <= $high_cr AND (";
foreach($type as $monster_type)
{
$query .= "type like '$monster_type' OR ";
}
$query = preg_replace("/ OR $/",");",$query);
$result = query($query);
if (mysql_num_rows($result) > 0)
{
while ($ss = mysql_fetch_object($result))
{
echo "name&lit=on\" target=_new>$ss->name
";
}
}
}
echo "";
if (isset($low_cr))
{
show_list();
}
?>