I have an input that allows people to upload images, then I use DirectoryIterator to display them, below is the code:
<div class=".content">
   <?php
   foreach ( new DirectoryIterator as $value ) {
      ?>
      <img src="<?php $value -> getFilename ?>">
      <?php
   }
   ?>
</div>
But after people uploaded the images, how do I only refresh the div .content and not the whole page with Ajax. ( I'm not interested in jQuery )
Like below is the example code for the input:
<form method="post" enctype="multipart/form-data">
   <input type="file" name="test">
   <input type="submit">
</form>
I have referred to this but it's too general and I have totally no idea how to implement it in my case.
