title: Failed to load resource the server responded with a status of 500 (internal server error) in php
body: <p>I would like my code to fetch a image from the database therefore
   I call the display.php. I got an interval server error in response. </p>
  
  <pre><code>  &lt;?require_once"db.php";
    $sql="select * from image";
  
    $result=mysql_query($sql);
  
     if($result)
       {
      while($row=mysql_fetch_array($result))
             {
        echo"&lt;img src=display.php?id=".$row['id']."/&gt;";
          }
         }
            else
            {
         echo"error";
               }
             ?&gt;
  
  
            display.php
  
            &lt;?require_once"db.php";
             $id=$_REQUEST['id'];
            $sql="select photo,imagetype from image where id='$id'";
           $result=mysql_query($sql);
                if($result)
              {
                $row=mysql_fetch_array($result)
             $type="Content-type:".row['imagetype'];
               header($type);
           echo $row['photo'];
                }
             else
             {
          echo "error";
          }
  
  
             ?&gt;
  </code></pre>
  
  <p>This is another page here, where I get the image from the database based on id. What is the error on this page? When I run show.php it shows the failed to relocate internal error 400. I tried to fix it but failed.                                              </p>