title: Display image from query output HTML
body: <p>In a given database using MYSQL, I am storing image file paths to be displayed. I retrieve the path using a query. The returned value is stored in a 'var' type variable. How can I use this as input to the <code>img</code> <code>src</code> attribute to display the image?</p>
  
  <p>For Example:</p>
  
  <pre><code>var x = "http://www.w3schools.com/jsref/compman.gif";
  &lt;img src=x&gt;
  </code></pre>
  
  <p>I am not able to use the above, so is there a way to display the image?</p>
  
  <p>Thanks in advance.</p>