I've managed to loop through an array as you suggest in main script. Each '?id=$whatever' is sent to another script to fetch the data (getdata.php). The only reason I'm doing this is because I'm having problems with Header content types. Although .jpegs are displayed, gifs are not for some reason. IWS I don't need to specify any content type for jpegs to be displayed?!
getdata script:
if($id) {
include("open_db.inc");
$query = "select bin_data,filetype,description
from binary_data where id=$id";
$result = @($query);
$data = @MYSQL_RESULT($result,0,"bin_data");
$type = @MYSQL_RESULT($result,0,"filetype");
$desc = @MYSQL_RESULT($result,0,"description");
Header( "Content-type: $type");
echo "$data";
}
sample script from main page:
<td ><img src="getdata.php?id=<? echo "$img_id"; ?>"></td>
Anyone shed light on this.