I have a simple PHP form which allows user to selet a file for image processing as well as a Java program to generate some imagesas output. The PHP will make a copy of the image in a specified folder but I need to pass in the image name from PHP to Java in order for the java program to run for the uploaded file. Is there any way to do it? These are part of my current codes for PHP...
<form method="post" action="imageview.php" enctype="multipart/form-data">
Select Image File to Upload: <input type="file" name="image" />
<br><input type="submit" name="upload" value="Upload File!">
</form>
<?php
if (file_exists("photosmp/".$imagename))
{
echo $imagename." already exists.";
echo "It is stored in ".$imagetmpname;
}
else
{
$newfilename = 'duplicate_'.$imagename;
move_uploaded_file($imagetmpname,"photosmp/". $newfilename);
$image = "photosmp/$newfilename";
}
?>