Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/01/2005, 09:42
mgm22ve
 
Fecha de Ingreso: septiembre-2004
Mensajes: 106
Antigüedad: 19 años, 6 meses
Puntos: 0
Resultados en Columnas

Buenas Tengo este codigo, Lo que me gustaría que mostara los resultados en columnas. Alguien que pueda ayudar. Gracias


<?
include("conexion.php");

mysql_connect($db_host, $db_user, $db_password);


mysql_select_db($db_name);

?>
<html>
<head>
<title>Prueba</title>
<link rel="stylesheet" href="estilo.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="333" height="93" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<?

$sql= ("SELECT * FROM rafael_contenido.productos ") or die ("No se Pudo establecer conexion con la bd");
$sql .= ("order by id asc");
$items =mysql_query($sql);

while($item = mysql_fetch_assoc($items)) {

$item_id = $item["id"];
$item_descripcion = $item["descripcion"];
$item_precio = $item["precio"];
$item_img = $item["img"];





$img_file = "img2/" . $item_id . ".jpg";


?>

<tr>
<td width="400" height="21" align="left" valign="top"><hr> </td>
</tr>
<tr>
<td height="70" align="center" valign="middle" bgcolor="#F3F3F3"><table width="320" border="1" cellpadding="1" cellspacing="1" bordercolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td width="88"><font color="#FFFFFF"><b> <font color="#000000">Nombre
</font></b></font> <font color="#000000"><strong>:</strong></font></td>
<td width="220"><b>
<?= $item_descripcion ?>
</b> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td><strong><font color="#000000">Precio : </font></strong></td>
<td>
<?= $item_precio ?>
</td>
</tr>
<tr align="center" valign="middle" bgcolor="#FFFFFF">
<td colspan="2">
<? if($item_img != "") { ?>
<img name="img_file_<?= $item_id ?>" src="<?= $img_file ?>" />
<? } ?>
</td>
</tr>
</table></td>
</tr>
<? } ?>
</table></td>
</tr>
</table>
</body>
</html>.