Un micro progresso è stato fatto. Ora riesco a visualizzare in random una foto, ma a me ne servono due affiancate. Posto il codice.
@include 'config.php';
$sql = "SELECT foto_id,foto_nome,foto_size,foto_type, foto, foto_cat,foto_naz FROM img WHERE foto_cat='Paesaggi,Ritratti,Macro' ORDER BY RAND() limit 2";
$result = @mysql_query($sql) or die(mysql_error ());
$row = @mysql_fetch_array($result);
$id_img = $row['foto_id'];
$type = $row['foto_type'];
$img = $row['foto'];
if (!$id_img)
{
echo "Id sconosciuto";
}else{
@header ("Content-type: ".$type);
echo $img;
echo $img;
}

Rispondi quotando