I am having problems displaying two different images on the same page. (stored as binary files in two different db tables)
Instead of getting two different images, I am getting the first image twice, although the scripts are going to two different database tables to get the two images. Is there a way to get both images to display on this page? Any help would be much appreciated. Thank you. The main code is: <? if (count($result3) > 0) { while ($result_array3 = mysql_fetch_array($result3, MYSQL_ASSOC)) { if ($result_array3["speaker_id"] !== "") { echo "<p><IMG SRC=\"small_image.php?speaker_id=" . $result_array["speaker_id"] . "\"></p>"; } } } if (count($result4) > 0) { while ($result_array4 = mysql_fetch_array($result4, MYSQL_ASSOC)) { if ($result_array4["speaker_id"] !== "") { echo "<p><IMG SRC=\"large_image.php?speaker_id=" . $result_array["speaker_id"] . "\"></p>"; } } } ?> ----------------- small_image.php: <? include("include.inc"); $sql = "SELECT bin_data, filetype, filename, filesize FROM smphoto_bin_data WHERE speaker_id=$speaker_id"; // . $HTTP_SESSION_VARS["speaker_id"]; $result = @mysql_query($sql); $data = @mysql_result($result, 0, "bin_data"); $name = @mysql_result($result, 0, "filename"); $size = @mysql_result($result, 0, "filesize"); $type = @mysql_result($result, 0, "filetype"); header("Content-type: $type"); header("Content-length: $size"); header("Content-Disposition: attachment; filename=$name"); header("Content-Description: PHP Generated Data"); echo $data; ?> ---------------- large_image.php: <? include("include.inc"); $sql = "SELECT bin_data, filetype, filename, filesize FROM lgphoto_bin_data WHERE speaker_id=$speaker_id"; $result = @mysql_query($sql); $data = @mysql_result($result, 0, "bin_data"); $name = @mysql_result($result, 0, "filename"); $size = @mysql_result($result, 0, "filesize"); $type = @mysql_result($result, 0, "filetype"); header("Content-type: $type"); header("Content-length: $size"); header("Content-Disposition: attachment; filename=$name"); header("Content-Description: PHP Generated Data"); echo $data; ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]