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

En esto va el script.

<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=$preciototal * 0.2;
$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);
if($row=mysql_fetch_array($mysql_result))
{
$preciototal=($alto*$ancho*$row[precio])*$cantidad;


if($pulido){
$preciototal=($pulido + $preciototal);
}
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>
solo me falta que la variable pulido funcione, ya que no hace ni una diferencia que la tickee o no en el form. Ya va a salir.
Chao.
Marcelo