$sql = "SELECT* ID, FirstName, LastName, contracted_hoursmon_am, FROM staffmember tbl"; // there's a . here that doesn't belong
$result=mysql_query($query);
//$numrows=mysql_num_rows($result); you should check if $result is valid before doing any operation on it
if (!$result) {...