prueba asi:
Código PHP:
Ver original<?php
$idImagen=$_GET['idI'];
$re=mysql_query("select * from tabla_imagenes where id_foto='$idImagen'"); echo '<a href="?idI='.$f['id_foto'].'"><img src="'.$f['foto'].'" width="200" height="200"/></a><br>';
}else{
echo '<a href="?idI='.$f['id_foto'].'"><img src="'.$f['foto'].'" width="200" height="200"/></a><br>';
}
}
?>
como dice repara2 te falto el 50% del codigo.