displaying images from mySql DB in html
I'm using dreamweaver mx2004 to develop a website and have been trying to insert an image from a mysql DB and can't get it to work.
Here is the code:
<?php $var1=($row_Recordset1["PROD_ID"]); ?> <?php echo $var1; //for testing ?>
<?php $PROD_ID = $var1; ?>
<td width="150" height="150" align="center" valign="top"><?php echo ("<img src=getImage.php?PROD_ID=$var1>"); ?></td
Then I have a separate php file called getImage.php
$PROD_ID = $_GET('PROD_ID');
$connID = mysql_select_db($database_testingDB, $testingDB);
$result = @mysql_query(
"SELECT IMAGE_THUMB FROM PRODUCT WHERE PROD_ID = $PROD_ID");
$row = @mysql_result($result, 0, "IMAGE_THUMB");
header("Content Type: jpeg");
When it runs I get the webpage fine, but no images, just image place holders.
Any ideas would be greatly appreicated.