title: upload image and showing the info
body: <p>I was trying to upload a picture file and I wanted to display the information of that picture. But my code is not working, I'm not sure what's the problem, I hope someone could point out what am I doing wrong.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Upload Image&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form action="upload_image.php" action="post" enctype="multipart/form-data"&gt;
  Select image: &lt;input type="file" name="image"&gt;
  &lt;input type="submit" name="upload" value="Upload Now"&gt;
  &lt;/form&gt;
  &lt;?php
  if(isset($_POST['upload'])){
  
     echo $image_name = $_FILES['image']['name'];
     echo $image_type = $_FILES['image']['type'];
     echo $image_size = $_FILES['image']['size'];
     echo $image_tmp_name = $_FILES['image']['tmp_name'];
  
     if($image_name == ""){
          echo "&lt;script&gt;alert('Please select an image!')&lt;/script&gt;";
          exit();
     }
  }
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>ps: I'm still new to php and file upload, so please go easy on me..Thank you in advance</p>