title: Inserting MySQL data as an image path
body: <p>When I try to do simple code like this everything works fine:</p>
  
  <pre><code>&lt;?php
  require 'connect.php';
  
  if($result = $con-&gt;query("SELECT * FROM table")) {
      if($row = $result-&gt;fetch_object()) {
          echo $row-&gt;imgName, ' ',$row-&gt;divId, '&lt;br&gt;';
      }
  } 
  ?&gt;
  </code></pre>
  
  <p>But inserting an image is not working for some reason:</p>
  
  <pre><code>&lt;?php
  require 'connect.php';
  
  if($result = $con-&gt;query("SELECT * FROM table")) {
      if($row = $result-&gt;fetch_object()) {
          echo "&lt;img src='img/".$row['imgName']."' /&gt;";
      }
  } 
  ?&gt;
  </code></pre>
  
  <p>Can you help me out, please! </p>