title: Display user input image without saving it to a folder
body: <p>How can I display an image and pass it as an input parameter in an executable in php without saving the image in a folder. The user gives the image path as input and I am using ajax to display the image when it is selected when I save it to a folder it works but how can I display it without saving it in a folder? My code now is</p>
  
  <pre><code>     move_uploaded_file($_FILES["file"]["tmp_name"],"upload/".$_FILES["file"]["name"]);
                          //echo "Stored in "."upload/".$_FILES["file"]["name"];
                          echo "&lt;img src='upload/".$_FILES["file"]["name"]."' class='preview'&gt;";
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>   &lt;img src=$_FILES["file"]["tmp_name"]. class='preview'&gt; 
  </code></pre>
  
  <p>but it didnt work. As I will have thousands of input from thousands of user I dont want to save it. Is there any optimised and efficient method to do this?</p>