Can you get images from a PHP upload?

26
July 12, 2018, at 01:00 AM

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.

READ ALSO
if smiliar foreach then add together Laravel 5.2

if smiliar foreach then add together Laravel 5.2

i want to add the values if they were same and similar

15
which is faster? echo &ldquo;&rdquo; or close php for printign HTML

which is faster? echo “” or close php for printign HTML

in my wordpress special Theme functionphp file i have alot of functions that contain some Html inside php codes

37
Not beautiful json array PHP [duplicate]

Not beautiful json array PHP [duplicate]

This question already has an answer here:

37
New template on External file - VueJS

New template on External file - VueJS

I am giving my first steps into SPA and VueJS and im trying to develop an small application which has many templates on the same and 1 on an external fileI was trying to follow the same logic for the same file's templates, but i have just seen that it is a complete...

41