My script has a user upload a pdf. I have found a pdf parser that then displays the first part of the plain text. The user will then verify that the data is the correct data. If it is, then the user submits the data and it saves it to a file. For data that isn’t a file, I’ve always passed the info using invisible form fields to an execute page. However with a file I’m not sure the best way to do it.
if ($_FILES["file"]["error"] > 0){
echo "Error: " . $_FILES["file"]["error"] . "<br>";
}
else{
$uploadedFile = $_FILES["file"]["tmp_name"];
$result = pdf2text($uploadedFile);
echo substr($result, 0, 200);
echo "<BR>";
}
Based on the POST method uploads manual
You will want to move your tmp_file to a cache directory inside your app, and then based on your validation being true or false remove it, or move it to a permanent directory.
and in the next script
this is just mock code, but should give you a better idea.