quindi nel tuo codice ti basterebbe fare

codice:
<? echo "<a href=\"window.open('foto3.php?id={$row['id']}');return false;\"> [b]Ingrandimento[b]" ?>
Ho scritto {$row['id']} anziche $row[id] perchè tale sintassi è deprecata nelle ultime versioni di PHP
il risultato è:
Not Found
The requested URL /window.open('foto3.php was not found on this server.