ciao neida,
ho provato il tuo codice e diciamo che ho quasi risolto i miei problemi, ma mi restano dei dubbi.
questo è il mio images.php
-----------------------------------------------------------------
<?php
include('connessione.php');
$sql = mysql_db_query("multimedia","SELECT idFotoArtista FROM artisti") or die(mysql_error());
while($row = mysql_fetch_object($sql)) {
echo "<img src=\"img.php?ID=$row->idFotoArtista\" /> ";
}
?>
-----------------------------------------------------------------
ora...se vado a provare images.php mi fa vedere questo:
![]()
__________________________________________________ _______
se invece vado a provare il file img.php da questo errore:
Warning: Cannot modify header information - headers already sent by (output started at C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\progetto\connessione.p hp:4) in C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\progetto\img.php on line 5
__________________________________________________ _________________________
questo è il codice img.php
-----------------------------------------------------------------
<?php
include('connessione.php');
$ID = isset($_GET['ID']) ? (int)$_GET['ID'] : exit(header('Location: images.php'));
$sql = mysql_db_query("multimedia", "SELECT type, FotoArtista FROM artisti WHERE idFotoArtista = $ID") or die(mysql_error());
$row = mysql_fetch_object($sql);
header("Content-type: $row->type");
echo $row->FotoArtista;
?>
-----------------------------------------------------------------
la linea di errore dovrebbe essere questa ma non so xkè....
$ID = isset($_GET['ID']) ? (int)$_GET['ID'] : exit(header('Location: images.php'));