no, what you wrote will not work, since you a outputing both an image and some html. What Twikie meant was that the header('content-type: image/jpeg') should be in the get_image.php file. Also, instead of doing a do...while loop, you should do a while loop. Way better, if, for example, there are no results. And it will save you a couple lines. Oh and you should seriously consider using names instead of numerical indices. It's way clearer.
PHP Code:
<?php
//display car info.php
$TableName = "automobileparts";
$SQLstring = "SELECT * FROM automobileparts";
require_once("dbconnect.php");
echo "<table width='100%' border='1'>";
while ($Row= $QueryResult->fetch_row()) {
echo "<tr><td>{$Row[0]}</td>";
echo "<td align='right'>{$Row[1]}</td>";
echo "<td align='right'>{$Row[2]}</td>";
echo "<td align='right'>{$Row[3]}</td>";
echo "<td align='right'>{$Row[4]}</td>";
echo "<td align='right'>{$Row[5]}</td>";
echo "<td align='right'><img src=\"get_image.php?image={$Row[1]}\" /></td>";
echo "<td align='right'></td>";
echo "<td align='right'><a href=\"Mail2.php?id={$Row[0]}\">Order</a></td>";
echo "</tr>";
}
echo "</table>";
$DBConnect->close();
?>
Next, in the get_image.php file:
PHP Code:
<?php
//get_image.php
// you need to sanitize it yourself
$image_id = $_GET['image'];
$TableName = "automobileparts";
$SQLstring = "SELECT * FROM automobileparts WHERE id = $image_id LIMIT 1";
require_once("dbconnect.php");
header('Content-Type: image/jpeg');
$Row= $QueryResult->fetch_row()
echo $Row[6];
$DBConnect->close();
?>