hello,..
i have problem with my script, my goals to display image from my query result.
i created picture database contain id, name & link (data contain link to picture folder localhost/nseries/A2-1C1-1B.png)
on my query display i created dynamic link to picture but when i click the link nothing show up
i've tried different script but nothing comes out only blank screen
php script i've tried
<?php
$q=$_GET["id"];
$con = mysql_connect('localhost', 'sigit_p', 'h4ngg401');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("kdplnseries", $con);
$query = "SELECT link FROM asmmanual WHERE id = '".$q."'";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result) or die(mysql_error());
echo "<img src=\"". $row['link'] ."\" alt=\"\" />";
?>
also
<?php
$q=$_GET["id"];
$con = mysql_connect('localhost', 'sigit_p', 'h4ngg401');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("kdplnseries", $con);
$data = mysql_query("SELECT * FROM asmmanual WHERE id = '".$q."'");
while($result = mysql_fetch_array( $data ))
{
echo '<img src="'.$q.'" width="312" height="50" alt="'.$q.'"(83 bytes)" />';
}
mysql_close($con);
?>
please help solve my problem ,...
thanks