you have two options here.
the first is to loop through your entire resultset for $result7.
But I would guess you can chqnge your SQL to
"SELECT id, username, accepted_img_id, accepted_by FROM accepted_pictures
WHERE accepted_img_id=\"$_GET['show']\" "
This is better because the database search will be quicker