I'm using this script:
$userdir = '../../'.$id.'/';
$files2 = scandir($userdir);
$ignore = array(".", "..");
foreach ($files2 as $value) {
if(in_array($value, $ignore)){
}
else {
echo '<img class="clickableimg" id="'.$value.'" src="../../'.$id.'/'.$value.'" />'; }
}
This is from a form when the users can choose an image and upload new images.
The problem is that I want the scandir() to fire up again when the user clicks on "refresh" without loosing form data.
Any ideas?