title: Displaying image in php
body: <p>Currently I'm trying to display an image from the database i created, using phpmyadmin to test my script. The database contains images in png and jpg. But the output are just nonsense characters because the browser cannot render the image. Can some one tell me where I get wrong?</p>
  
  <p>I google the problem and I can see their pattern and mine are similar so I don't really under stand where I get wrong. I can get the name of the image in database, but not the image.</p>
  
  <p>this is my script:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;
  
  &lt;?php
  $con = mysqli_connect("localhost", "Dave", "password");
  if (!$con){
      die ("Could not connect to database: " . mysqli_connect_error());
  }
  
  mysqli_select_db($con, "snippet");
  
  $res = mysqli_query($con, "select * from image");
  
  echo "&lt;table&gt;";
  while ($row = mysqli_fetch_array($res)){
      echo "&lt;tr&gt;";
      echo "&lt;td&gt;"; ?&gt; &lt;img src="&lt;?php echo $row["image"]; ?&gt;" height="100" width="100"&gt; &lt;?php echo "&lt;/td&gt;";
      echo "&lt;td&gt;"; echo $row["image_name"]; echo "&lt;/td&gt;";
      echo "&lt;/tr&gt;";
  }
  echo "&lt;/table&gt;";
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>