echo "
Michigan Bird Records Committee Searchable Database";
echo "This search engine queries all records recognized by the MBRC; searches can be made only for species currently on the
MBRC Review List";
echo "Disclaimer : All data are unofficial unless verified by the
secretary. Any search results should not be considered exhaustive; regular updates will occur.
";
echo "Instructions : Searches can be made by entering all or part of a species name or county name. For the most restrictive output, type in the complete species name rather than a fragment (e.g. 'Mew Gull' instead of 'Gull'); spelling is important. For common names which include an apostrophe, an error message will result unless you change the single apostrophe to two single, unspaced, apostrophes. For example, to search for Townsend's Warbler records type in 'Townsend''s Warbler'. For unidentified frigatebirds type 'Fregata', for unidentified sulids use 'sulid', for unidentified Plegadis ibises use 'Plegadis', and for unidentified Aechmophorus grebes use 'Aechmophorus'. All accepted records of seasonal review species (such as Baird's Sandpiper) and review subspecies (such as 'Krider's' and 'Harlan's' Red-tailed Hawks, 'Richardson's' Merlin, 'Great White' Great Blue Heron, 'Audubon's' Yellow-rumped Warbler, and 'Yellow' Palm Warbler) are included. Junco subspecies (Gray-headed, Pink-sided, and Oregon) and subspecies lacking any accepted records for Michigan are excluded. Leaving the box blank and hitting enter will reveal all records in the database.
";
echo "Database updated 9 January 2013";
// camera test
// echo "
";
echo "
";
$todo=$_POST['todo'];
// Get keyword passed from Query String ?keyword=gull
if($_REQUEST['keyword'] == "")
{
// no keyword entered
// echo "You did not enter a keyword.";
}
else
{
$search_text = $_REQUEST['keyword'];
}
// Get keyword from input box typed in
if($_POST['search_text'] == "")
{
// no keyword entered
// echo "You did not enter a keyword.";
}
else
{
$search_text=$_POST['search_text'];
}
if((isset($todo) and $todo=="search") or $search_text <> "" )
{
$search_text=ltrim($search_text);
$search_text=rtrim($search_text);
$q=" species like '%$search_text%' or county like '%$search_text%'";
$query="select * from tblAccepted where $q order by species, record_no";
echo "Records containing the keyword '$search_text'";
echo "
";
$username="mbrc";
$password="larus2323";
$database="mbrc";
mysql_connect('localhost',$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
// echo "Executing query: '$query'";
$nt=mysql_query($query);
mysql_close();
echo mysql_error();
echo "
";
echo "";
echo "| State Record No. | ";
echo "Species (Count) | ";
echo "Date | ";
echo "County | ";
echo "Photo | ";
echo "
";
while($row=mysql_fetch_array($nt))
{
echo "";
echo "| ";
echo "$row[record_no] | ";
echo "";
echo "$row[species] ($row[individuals]) | ";
echo "";
echo "$row[text_date] | ";
echo "";
echo "$row[county] | ";
if (is_null($row[photo_link]))
{
echo "";
echo "$row[photo_link] | ";
}
else
{
echo " | ";
}
echo "
";
}
echo "
";
// End if form submitted
}else{
}
echo "
*Special thanks to Nathan Stouffer for creating this search engine.";
?>
Total Searches or Hits : ";
include ("counter.php");
?>