Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/09/2002, 20:15
marceloxx6
 
Fecha de Ingreso: agosto-2002
Ubicación: Santiago de Chile
Mensajes: 136
Antigüedad: 21 años, 8 meses
Puntos: 1
no quería mandar este post pero....

como dije no quería mandar este post, ya que llevo 24 horas revisandolo y he logrado solucionar muchos detalles que me tenían varado pero ahora estoy agotado y necesito ayuda.
al grano: tengo este script que procesaa un formulario:
<html>
<body>
<table width="100%">
<tr>
<td><table width="90%" border="1" align="center">
<tr>
<th width="44">id</th>
<th width="175">Nombre</th>
<th width="175">Precio metro²</th>
<th width="100">Cantidad</th>
<th width="65">Alto</th>
<th width="65">Ancho</th>
<th width="160">Precio Total</th>
</tr>
<?php
$id = $producto;
$enviar = true;


$pulido=true;
$id_producto=$id;
if ($enviar){
$mysql_link=mysql_connect("localhost", "site85", "456422");
mysql_select_db("site85_1", $mysql_link);
$query="select * from productos where id_producto=$id";
$mysql_result = mysql_query ($query,$mysql_link);

$preciototal=$alto*$ancho*$row[precio];
if($pulido){
$preciototal=$preciototal * 0.2 + $preciototal;
}
if($row=mysql_fetch_array($mysql_result))
{
echo("<tr><td>$row[id_producto]</td>
<td>$row[nombre]</td>
<td>$row[precio]</td>
<td>$cantidad</td>
<td>$alto</td>
<td>$ancho</td>
<td>$preciototal</td></tr>");

}
}
?>
</table>
</body>
</html>
y el unico problema es que en el campo precio total me da cero. todos los otros campos aparecen tal cual los ingreso en el formulario, cero problema.(casi)
gracias