Código HTML:
<head> <script language="JavaScript"> function Abrir_ventana (pagina) { var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=508, height=365, top=85, left=140"; window.open(pagina,"",opciones); } </script> </head> <body> <a href="javascript:Abrir_ventana('http://www.google.com')"><font size="1" face="Verdana">Click aquí para abrir la ventana</font></a> </body>
Código PHP:
while($row = mysql_fetch_array($resultados))
{
$contador;
if($contador==0){
echo '<tr>'; }
$foto=$row["foto"];
echo"<td color='#000000'><a href='fotos/$foto' target='_blank'><img src='fotos/$foto' width='150' height='100' border='#000000'><br><br></a></td>";
if($contador==4){ echo
"</tr>";
$contador=0;
}
else{ $contador++;}
} ?>