PHP Submitting form with images. Access that image on the next page
<p>I am having issues trying to access a submitted image from a form on the next page.</p>

<p>Here is my php in my html.</p>

<p>I am looping through a folder of images and echoing them onto the page.</p>

<pre><code>&lt;form action = "Order_Form.php"
    method = "post"
    enctype = "multipart/form-data"&gt;
&lt;?php
    $files = glob("images/*.*");
    $count = 0;


for ($i=0; $i&lt;count($files); $i++)
{ 
 $num = $files[$i]; 

    if($count == 4){
      echo "&lt;br&gt;";
      $count = 0;
    }
    $count++;


    echo '&lt;input type="image" src="'.$num.'" 
    alt="img"  name="image" class = "galImgs" value="submit"  /&gt;';
}


?&gt;
&lt;/form&gt;
</code></pre>

<p>And now on submit I proceed to Order_Form.php</p>

<p>I want to display the picture the user clicked/submitted to the page.
I have been trying with </p>

<pre><code>      $nm = $_POST['image'];      
      echo '&lt;img src="/files/images/.$nm" class= "image"/&gt;';
</code></pre>

<p>Im pretty sure it has to be something simple, but after much googling and trial &amp; error I can't seem to figure this out.</p>

<p>Any help would be appreciated. Thank you.</p>
