So I have a page containing PHP that will take multiple images, then save and display them.
<?php
if(isset($_POST['submit'])){
// Count total files
$countfiles = count($_FILES['file']['name']);
echo "<br>";
// Looping all files
for($i=0;$i<$countfiles;$i++){
$filename = $_FILES['file']['name'][$i];
echo '<img src="upload/'.$filename.'" height=200>';
// Upload file
move_uploaded_file($_FILES['file']['tmp_name'][$i],'upload/'.$filename); }
echo "<br>";
echo "<h3>Now that you have uploaded your photos, please arrange them and submit them</h3";
}
?>
Problem is, I have another page where I would like to use just the ones that have been just uploaded. What can I use to add these to the other page? Bare in mind that the PHP is written so that it echos the image then moves the images from temp storage into a directory that has hundreds of other images so it needs to be taken ideally from somewhere like here
echo '<img src="upload/'.$filename.'" height=200>';
so that it isn't random.