title: Using PHP how can i display images which have been saved in SQL as a image path
body: <p>I am trying to retrieve images from my SQL database which have been saved using the image path. The images are saved on the server. When i retrieve the images , nothing is returned.</p>
  
  <pre><code>if(isset($_GET))
  {
    include_once "mysql_connect.php"; 
    $text = $_GET['text']; 
  
  
    if($text=="")
    {
  
    $query = mysql_query("SELECT `URL` FROM `gallery` WHERE `img_text` LIKE '1'")
    or die(mysql_error());  
  
    while( $rows=mysql_fetch_array($query) )
    {
     $search[] = $rows[0];
  
    }
  
   $result = array();
   $result["result"] = 500;
   $result["message"] = "Database Read Successfully";
   $result["rows"] = $search;
   echo json_encode($result);
   exit; 
  </code></pre>
  
  <p>The example of code is for a search without the user entering a value. Within the SQL statement 'URL' is the field where the image paths are stored.The images paths values are the complete URL <a href="http://example.com/images/test.jpg" rel="nofollow">http://example.com/images/test.jpg</a> and stored as a VARCHAR(200) . Any advice would be appreciated</p>