0

Hi! im new to php programming

im trying to output the file image uploaded to a directory in localhost

im using xampp

i tried several things

im unable to get image displayed

it shows only blank page

if not it shows a very small icon which indicates that pic cannot be loaded.

heres my code:

<?php
require_once("includes/connection.php");

$query = "SELECT * FROM images WHERE product_id='1'";
$result = mysql_query($query);

//retrieve record from category table and assign to $row array
while($row = mysql_fetch_array($result))
{

	//$content = $row['image_id'];
	//echo "<img src=C:/xampp/htdocs/images/".$row['image_id'] ."> <br>";
	//echo "<img src=file:///C:/xampp/htdocs/mags/images/".$row[0] ."> <br>";
	//echo "<img src=http://localhost/images/".$row[0] ."> <br>";
	//echo "<img src='http://localhost/images/maps.jpg' />";
	//. $row['tb_image']; 
}
//header('Content-type: image/jpg');
     //echo $content;
?>

Note: all the comment part inside the while are the codes that i have tried already but not getting any success.

hope you can help

thanks in advance

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by pzuurveen
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.