This may or may not be the right forum - BUT
I am using php to recall data from mysql and build a table. One of the fields in mysql contains an image. When I look at it in mysql (using mysqlyog), I can see the image. When I draw it out of the database to display in a table, the image falls apart. it is a .jpg.
Here is a sample of what I get on the screen:
[INDENT]ÿØÿàJFIFddÿìDucky<ÿîAdobedÀÿÛ„ ÿÀu ÿļ !1AQ"a2qB#‘¡Rb±Ár3ðÑ‚’$ÂCÓ4áñSt%7¢²Òc5U&!1AQq"a2‘¡±ðÁÑáBRñb#3r‚’Â$4ÿÚ ?êš <>û1Ù[Ï,6ÓcrÖ£4ñydäC‹m¥!”ü‹WâááRj†©Bñ_q™scHÿÌ´êÒíúî !_¾¬TË?ˆJCkEú¤Øý‡JM1ÚO±ôÎýE½Š÷oÓe½Wûª’â¸í‡ ”pÌÆR}ÇUd¡'©·ZÕUJÓ£¡e‹Û^µQPPPPPPPPPPPPy·rÇ'b˜+KóËíý:Úýµ…»»bJV6›”óN¶ëhu¥‡p!i ¥I"à‚:ƒ@z ...[/INDENT]
Here is the code I am using:
<?php
$db_name = "t2s_products";
$table_name = "products";
$connection = mysql_connect() or die(mysql_error());
// get the database list
$dbs = mysql_select_db ($db_name, $connection) or die(mysql_error());
$sql = "SELECT * FROM $table_name ORDER BY check_box_value";
$results = mysql_query($sql, $connection) or die(mysql_error());
while ($row = mysql_fetch_array($results)) {
$part_number = $row[part-number];
$image = $row[image];
$description = $row[description];
$check_box_value = $row[check_box_value];
$part_number = $row[part-number];
$misc = $row[misc];
$dl_price = $row[dl_price];
$mail_price = $row[mail_price];
$display_table .= "<tr>\n<td valign=\"top\">\n<input type=\"checkbox\" value=\"$check_box_value\" name=\"name\" />$part_number\n<br />$part_name\n<br />Download Price: \$$dl_price\n<br />Mailed Price: \$$mail_price</td>\n<br />\n<td valign=\"top\" >$image</td>\n<br />\n<td valign=\"top\">$description</td>\n</tr>\n";
}
// begin table
$start_form = "<form>\n";
$end_form = "</form>\n";
$start_table = "<table border=\"1\">\n";
$end_table = "</table>\n";
$submit = "<input type=\"submit\" value=\"SUBMIT\" name=\"submit\">\n";
?>
Is there something wrong with the way I am drawing the image out, or what???
Thanks in advance,
Gordon