<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Animal Gallery</title> </head> <body> <div> <?php $animal = ""; if (isset($_REQUEST["animal"])) { $animal = $_REQUEST["animal"]; } $files = glob("images/{$animal}*.jpeg"); foreach ($files as $image) { ?> <img src="<?= $image ?>" alt="animal picture" /> <?php } ?> </div> </body> </html>