hi,can anyone plz help me..the coding wuz ok,it generate the image from in my directories except it shows a blank image...i don't know wats the prob,plz help me...
here is the coding...
<?php
// connect to mysql server
$link = mysql_connect('localhost', 'root', 'abc123');
if (!$link) {
die('Not connected : ' . mysql_error());
}
// connect to database server
$db_selected = mysql_select_db('test', $link);
if (!$db_selected) {
die ('Database error : ' . mysql_error());
}
$sql = "select img_name from templates where img_id=1";
// the result of the query
$result = mysql_query($sql) or die("Invalid query: " .mysql_error());
// Header for the image
while ($pic = mysql_fetch_array($result)){
//echo $pic[img_name];
//header("Content-type: image/jpeg");
echo "<img src='picture/".$pic[img_name]."' width='300' height='300' />" ;
}
?>