I am attempting to upload multiple images at once, and then on submit display those images on the page. This is going to be used with mPDF. I am using the examples in the manual at <http://mpdf1.com/manual/index.php?tid=467>

It has a text box and 1 image uploader, and displays what ever was in the text box and the image on the next page. How can I convert this to use multiple images?

Page 1:

```
<?php
$html = '
<html>
<body>
<form action="example_userinput2.php" method="post" enctype="multipart/form-data">
Enter text:
<br />
<textarea name="text" id="text"></textarea>
<br />
<label for="file">Choose Image to upload:</label> <input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
';
echo $html;
exit;
?>

```

Page 2: (also more specifically what I change the areas I marked \*\* \*\*, after allowing multiple images.)

```
<?php

if (($_FILES["file"]["type"] == "image/gif" || $_FILES["file"]["type"] == "image/jpeg")
& $_FILES["file"]["size"] < 20000)   {
// If the destination file already exists, it will be overwritten
move_uploaded_file($_FILES["file"]["tmp_name"], "../tmp/" . $_FILES["file"]["name"]);
}
else {
echo "Invalid file";
}

$html ='
<html>
<body>
<div>'.$_POST['text'].'</div>
**<img src="' ."../tmp/" . $_FILES["file"]["name"].'" />**

<form action="example_userinput3.php" method="post" enctype="multipart/form-data">
<textarea style="display:none" name="text" id="text">'.$_POST['text'].'</textarea>
**<input type="hidden" name="filename" id="filename" value="'. $_FILES["file"]**["name"].'" />
<input type="submit" name="submit" value="Create PDF file" />
</form>

</body>
</html>
';
echo $html;
exit;
?>

```

Page 3 goes to the mPDF generator so I can convert this to PDF for another project I have in mind.

Any help would be awesome.