Ver Mensaje Individual
  #5 (permalink)  
Antiguo 12/11/2007, 10:23
Avatar de franklin85
franklin85
 
Fecha de Ingreso: octubre-2006
Mensajes: 103
Antigüedad: 17 años, 6 meses
Puntos: 0
Re: mostrar imagen y datos con php y bd

Hola a todos ante todo gracias por su ayuda.
Bueno lo que estoy tratando de hacer es lo siguiente aqui les muestro el codigo:
Código PHP:
<?php
ob_start
("ob_gzhandler");
session_start();
mysql_connect("localhost","root","root");
mysql_select_db("cuadros");
if(isset(
$_SESSION['carro']))
$carro=$_SESSION['carro'];else $carro=false;
$qry=mysql_query("select * from cuadros order by codigo asc");
?>
<html>
<head>
<title>CAT&Aacute;LOGO</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JavaScript">
function imagen (URL){
window.open(URL,"imagen","width=530, height=545, top=100,left=300 scrollbars=no, menubar=no, location=no, resizable=no")
}
</script>

</head>
<body>

<table cellpadding="0" cellspacing="0">
<tr>
<td><strong>Codigo</strong></td>
<td><strong>Producto</strong></td>
<td align="center"><strong>Ver Foto</strong></td>
<td align="center"><strong>Precio</strong></td>
<td align="right"><img src="vercarrito.gif"></td>
</tr>
<?php
while($row=mysql_fetch_assoc($qry)){
?>
<tr>
<td><?php echo $row['codigo'?></td>
<td><?php echo $row['producto'?></td>
<td align="center"><a href="javascript:imagen ('imagen.php"><?php echo $row['imagen'?></a></td>
<td align="center"><?php echo $row['precio'?></td>
<td align="center"><?php
if(!$carro || !isset($carro[md5($row['codigo'])]['identificador']) || $carro[md5($row['codigo'])]['identificador']!=md5($row['codigo'])){
?><a href="agregacar.php?<?php echo SID ?>&codigo=<?php echo $row['codigo']; ?>"><img src="productonoagregado.gif" border="0" title="Agregar al Carrito"></a><?php }
else
{
?><a href="borracar.php?<?php echo SID ?>&codigo=<?php echo $row['codigo']; ?>"><img src="productoagregado.gif" border="0" title="Quitar del Carrito"></a><?php ?></td>
</tr>
<?php ?>
</table>

<table align="center" cellpadding="0" cellspacing="0">
<tr><td><a href="vercarrito.php?<?php echo SID ?>" title="Ver el contenido del carrito"><img src="vercarrito.jpg"></a></td></tr>
</table>


</body>
</html>
<?php
ob_end_flush
();
?>
Las imagenes estan separadas en una carpeta llamada fotos.
Como seria el codigo a utilizar en el archivo imagen.php y como puedo mandar los datos hacia el popup. De ante mano gracias por su ayuda