ho provato a modificare il codice in questo modo ma non visualizzo l'immagine
richiamo sempre da mostra_logo.php?od=$dati[od]
e questo è il codice:
Codice PHP:
<?
// Download script.. streams data from a mysql database, thru the webserver to a client browser
if (isset($_GET["od"])) {
include("../inclusioni/conf.php");
// connessione e selezione del database
if (!$linkid = @mysql_connect($dbhost, $dbuser, $dbpass)) {
die("Unable to connect to storage server!");
}
if (!mysql_select_db($db, $linkid)) {
die("Unable to connect to storage database!");
}
// Pull the list of file inodes
$SQL = "SELECT od FROM utenti WHERE od = " . $_GET["od"] ;
if (!$RES = mysql_query($SQL, $linkid)) {
die("Failure to retrive list of file inodes");
}
while ($CUR = mysql_fetch_object($RES)) {
$nodelist[] = $CUR->od;
}
// Send down the header to the client
Header ( "Content-Type: $FileObj->Type" );
Header ( "Content-Length: " . $FileObj->Size );
Header ( "Content-Disposition: attachment; filename=$FileObj->Nom" );
// Loop thru and stream the nodes 1 by 1
for ($Z = 0 ; $Z < count($nodelist) ; $Z++) {
$SQL = "select DatiBinari from utenti where od = " . $nodelist[$Z];
if (!$RESX = mysql_query($SQL, $linkid)) {
die("Failure to retrive file node data");
}
$DataObj = mysql_fetch_object($RESX);
echo $DataObj->DatiBinari;
}}
?>