php y shadowbox

[email protected]
Newsgroups php.general.es
Message-ID <[email protected]>
Hola amigos, tengo una dudita.

Tengo una página donde tengo un listado de productos y cada producto puede
tener n cantidad de fotos que se van a mostrar con el shadowbox, hasta aqui
todo bien, el problemita se me genera porque neecsito mostrar en la web
solo la primera foto y al hacer click en ella entonces que se abra el
shadowbox con todas las demas fotos.

Anexo la parte del código correspondiente para ver si alguien me puede
ayudar.

<div id="img" class="img_materiales">
<?php
     $sql="select foto from fotos_productos where id_foto=$row[id] order
by id desc limit 1";
     $resultg=mysql_db_query($basedatos,$sql,$link);
     while($rowg=mysql_fetch_array($resultg))
     {
	$imagen=$rowg['foto'];
     }
?>
<?php
     $sql="select foto from fotos_productos where id_foto=$row[id] order
by id desc";
     $resultg=mysql_db_query($basedatos,$sql,$link);
     while($rowg=mysql_fetch_array($resultg))
     {
	echo("<p><a rel='shadowbox[gal]' href='img_productos/$rowg[foto]'
title=''><img src='img_productos/$imagen' alt='' class='foto_iz_md'
width=112 height=95 /></a></p>");
     }
?>
</div>

Muchisimas gracias a todos.

Saludos

Irantzu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.