Ver Mensaje Individual
  #10 (permalink)  
Antiguo 07/12/2012, 11:46
cesar_viridi
 
Fecha de Ingreso: enero-2012
Ubicación: Mexico Df
Mensajes: 95
Antigüedad: 12 años, 3 meses
Puntos: 6
Respuesta: Cajas de texto

Prueba asi

Código PHP:
Ver original
  1. $pre = mysql_query("select PRECIO from productos where nombre='".$nom."'");
  2.    $pre = mysql_fecht_array($pre);
  3.    $pre = $pre['PRECIO'];
  4.                     $tot = ($can * $pre);
  5.                     echo("<input type=text value=".$nom."><input type=text value=".$can."><input type=text value=".$pre."><input type=text value=".$tot."><br>");
  6.                     $total = $total + $tot;
  7.                     $art++;
  8.                     mysql_query("UPDATE productos SET cantidad = cantidad - ".$can." where nombre =