<?php
function rasmname(){
$dirname = "./";
$images = glob($dirname."*.jpg");
foreach($images as $image) {
echo '<img src="'.$image.'" /><br />';
}
}
rasmname();
<html>
<head>
<title>display image</title>
</head>
<body>
<p>Here in your form and text</p>
<?php
echo "<img src='image-name.png' >";
?>
</body>
</html>