it's problematic at best to do the file upload on page 2.
it would really require more work to it that way. the form on page 2 would need to post to itself, you would need the code to set the sessions on page 2, you would also need to save another session that contains the Uploaded files server file name.
then add code to redirect to the insert pager after the sessions have been set:
<?php
if($_SERVER['REQUEST_MOTHOD'] == "POST") {
header("location: insert.php");
?>