Simple image displaying php error
        Posted  
        
            by 
                Rani dubey
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Rani dubey
        
        
        
        Published on 2014-08-22T16:01:23Z
        Indexed on 
            2014/08/22
            16:21 UTC
        
        
        Read the original article
        Hit count: 282
        
php
In a query say i have a image path that have multiple images stored as path=http://localhost/images/xyz.When i run the code:
<?php
//Retrieves data from MySQL
mysql_connect("localhost", "root", "") or die 
("Could not save image name Error: " .   mysql_error());
mysql_select_db("dawat") or die("Could not select database");
$data = mysql_query("SELECT 'images_path' FROM images_tbl") or
die(mysql_error());
//Puts it into an array
$file_path = 'http://localhost/images/xyz';
while($row = mysql_fetch_assoc( $data ))
{//Outputs the image and other data
    $src=$file_path.$row["images_path"];
    echo "<img src=".$src.">  <br>";
}
?>
Everything is working fine,but only images are not showing.On place of images it is showing small thumnails.Please suggest what to do.... Sql query i used is:
CREATE TABLE images_tbl(
   images_id INT NOT NULL AUTO_INCREMENT,
   images_path VARCHAR(200) NOT NULL,
   submission_date DATE,
   PRIMARY KEY (images_id)
);
© Stack Overflow or respective owner