danke nochmal und sorry wegen dem sudern...
danke nochmal und sorry wegen dem sudern...
print "<td> <img src=\"picture.php?id= . $productId . </td>";
<?php
require '../db.inc.php';
//This is a general error function that can be called
function showerror()
{
die("Error " . mysql_errno() . " : " . mysql_error());
}
$query = "Select Image FROM product WHERE ProductId=1";
// Connect to the MySQL server
if (!($connection = @ mysql_connect($hostname, $username, $password)))
die("Cannot connect");
if (!(mysql_select_db($databaseName, $connection)))
showerror();
// Run the query on the connection
if (!($result = @ mysql_query ($query, $connection)))
showerror();
// set the header for the image
header("Content-type: image/jpeg");
echo mysql_result($result, 0);
// close the db link
mysql_close($connection);
}
?>
<img src="picture.php">
Einen Kommentar schreiben: