Thank you Sir for any help.
This code is giving me the gameandtoyname and pricetype ok. But not the image it just shows the border.
Could you help me?
<?php
$sql = ("SELECT gameandtoyname, pricetype, dollsimage.image_id, dollsimage.image_date
FROM dollsimage, dolls
WHERE dollsimage.image_id = dolls.image_id
ORDER BY image_date DESC");
$result = mysql_query ($sql, $conn);
if (!$result) {
die('Invalid query: ' . mysql_error());
}
$str = "";
if (mysql_num_rows($result)>0) {
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$i++;
$str .= $i.". ";
$str .= "<a href=\"textimage8.php?iid=".$row["image_id"]."\">".$row["image_name"]."</a> ";
$str .= "[".$row["gameandtoyname"]."] ";
$str .= "[".$row["pricetype"]."] ";
$str .="<img border=\"1\" height=\"90\" width=\"100\" src=\"imagedolls.php?act=view&iid=".$row["image_id"]."".$row["gameandtoyname"]."".$row["pricetype"]." \"></a> ";
$str .= "[<a href=\"index.php?act=rem&iid=".$row["image_id"]."\">Remove</a>]<br>";
}
print $str;
}
?>
Imagedolls.php:
<?php
// database connection
$conn = mysql_connect("localhost", "root") OR DIE (mysql_error());
@mysql_select_db ("products", $conn) OR DIE (mysql_error());
$sql = "SELECT * FROM dollsimage WHERE image_id=".$_GET["iid"];
$result = mysql_query ($sql, $conn);
if (mysql_num_rows ($result)>0) {
$row = @mysql_fetch_array ($result);
$image_type = $row["image_type"];
$image = $row["image"];
Header ("Content-type: $image_type");
print $image;
}
?>