I've been working on these codes for 2 hours now and i can't seem to make it appear. It has the right ID, but the picture doesnt show. i have no idea why.
anyway, here are my codes.
this is for showing the pic along with other stuff.
<div align="left">
<center><img src="img/compressportbanner.jpg" height="180"></center>
<table border="0" cellpadding="2px" width="600px">
<?php
$result=mysql_query("select * from inventory WHERE prod_brand = 'Compressport' AND prod_category='compression' ");
while($row=mysql_fetch_array($result)){
?>
<tr>
<td>
<?php
echo '<'.'img src="image.php?prod_id='.$row['prod_id'].'" alt="'.$row['prod_name'].'" width="250">';
?>
</td>
<td> <b><?php echo $row['prod_name']?></b><br />
<?php echo $row['prod_category']?>
<!--<?php echo $row['prod_desc']?>-->
<br>
Price:<big style="color:green">
₱ <?php echo $row['prod_price']?></big><br /><br />
<input type="button" value="Add to Cart" onclick="addtocart(<?php echo $row['prod_id']?>)" />
</td>
</tr>
<tr><td colspan="2"><hr size="1" /></td>
<?php } ?>
</table>
</div>
and here is the image.php
<?php
$prodID=($_GET['prod_id']);
$sql = "SELECT * FROM `inventory` where `prod_id` = ".$prodID;
$qry = mysql_query($sql);
$result=mysql_fetch_array($qry);
echo '<img src="data:image/jpeg;base64,'.base64_encode( $result['prod_pic'] ).'"/>'
?>
How do i make it appear, im new to php and im just starting to understand it.