title: PHP - Upload picture and display on page
body: <p>The following code allows me to upload pictures (using a html form) to a directory on my server.</p>
  
  <pre><code>&lt;?php 
  
      $target = "http://www.mockcourt.org.uk/user/htdocs/pics/2012/";
      $target = $target . basename( $_FILES['uploaded']['name']); 
      $ok=1; 
  
      if (move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) 
      {
          echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
      } 
      else
      {
          echo "Sorry, there was a problem uploading your file.";
      }
  ?&gt;
  </code></pre>
  
  <p>Is there any way to modify it so that it will add the pictures to a html page instead?</p>
  
  <p>Thanks</p>