title: image not displaying when uploading in php
body: <p>I'm using a very simple php page to upload a file and display the image to same page; however, the image is not displaying. I checked whether the image was being uploaded and where, and it is being uploaded to the same directory as the php file.</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Title&lt;/title&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;File Upload&lt;/h1&gt;
      &lt;form method="post" action="upload.php" enctype="multipart/form-data"&gt;
      Select File: &lt;input type="file" name="filename" size="10" /&gt;&lt;br/&gt;
      &lt;input type="submit" value="upload" /&gt;
      &lt;/form&gt;
  
      &lt;?php
          //checking if user uploaded image
          if($_FILES) {
              $name = $_FILES['filename']['name'];
              move_uploaded_file($_FILES['filename']['tmp_name'], $name);
              echo "Uploaded image $name &lt;br/&gt;";
              echo "&lt;img scr='$name' height='100px' width='100px'/&gt;";
          }
      ?&gt;
  
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>