First of all, you don't need two queries, just select both fields in one:
$selectImg = "SELECT img, pageName FROM webBody WHERE sectionID = '$pgID'";
Second, assign the result of the mysql_query to a $result variable and check for an error with an "or die..."
Third, check if the query returned anything with something like:
if ($row = mysql_fetch_array($result) ) ...
My guess is that what you think is in $pgID is incorrect, that the query simply isn't returning any rows.