title: Trying to show uploaded image in my "Edit form"
body: <p>I have this code code below to upload image in a foder uploads/year/month, if this directory does not exist it will create if exists I only do the upload.</p>
  
  <p>After this code, Im doing a insert into my "news" table with this thumb info and the other <em>table news</em> fields.</p>
  
  <p>And it is working fine, Im inserting without any error, its inserting in my database, and the image file is uploading with sucess in my uploads/year/month folder.</p>
  
  <p>But now in my other file "news-edit.php", to edit my news, and I want to show the thumb file in my label.</p>
  
  <p>Im trying to do this for hours and its not working, somebody there can give me a help understanding what is happening?</p>
  
  <p><strong>My php code to upload image</strong></p>
  
  <pre><code>if(!empty($_FILES['thumb']['tmp_name'])){
  
      $folder  = '../uploads/';
      $year    = date('Y');
      $month    = date('m');
  if(file_exists($folder.$resultReadEdit['thumb']) &amp;&amp; !is_dir($folder.$resultReadEdit['thumb']))
  {
  unlink($folder.$resultReadEdit['thumb']);
  }
  
  if(!file_exists($folder.$year)){
  
  mkdir($folder.$year,0755);
  
  
  }
  
  if(!file_exists($folder.$year.'/'.$month)){
      mkdir($folder.$year.'/'.$month,0755);
  }
  
      $img = $_FILES['thumb'];
      $ext = substr($img['name'],-3);
      $f['thumb'] = $year.'/'.$month.'/'.$f['url'].'.'.$ext;
      uploadImage($img['tmp_name'], $f['url'].'.'.$ext, '300', $folder.$year.'/'.$month.'/');
  
  }
  </code></pre>
  
  <p>My php to show the image file:</p>
  
  <pre><code>&lt;label class="line"&gt;
  &lt;?php
      $folder  = '../uploads/';
      $year    = date('Y');
      $month   = date('m');
      echo '&lt;a href="'.$folder.$year.'/'.$month.'/'.$resultReadEdit['thumb'].'"  rel="Shadowbox"&gt;';
      echo '&lt;img src="'.$folder.$year.'/'.$month.'/'.$resultReadEdit['thumb'].'"  width="50" /&gt;';
      echo '&lt;/a&gt;';
      print_r($resultReadEdit['thumb']);
  ?&gt;   
  &lt;input type="file" class="fileinput" name="thumb" size="60" /&gt;
  &lt;/label&gt;
  </code></pre>
  
  <p><strong>What Im getting:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/wWfhd.png" alt="enter image description here"></p>