Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/09/2019, 10:00
Parliament
 
Fecha de Ingreso: noviembre-2003
Mensajes: 499
Antigüedad: 20 años, 5 meses
Puntos: 7
sumar valores de campos

tengo que sumar los valores de un imput y multiplicarlos por 2,3,4,5, et mientras los voy cargando, tengo este codigo, pero no me doy idea donde poner los subtotales que despues sumados sera un total
Código PHP:
 echo "Modificacion de habitaciones de:";
echo  $Pre;
  ?> 
<table width='100%' border='0' align='center'  class='mitabla'>
    <form method="post" action="pagina3modihabit.php">
  <input type="hidden" name="Pre" value="<?php echo $Pre ?>"/>
  <tr>
  <th>Single:</th>
  <td><input type="text"  name="sin" size="30" value="<?php echo $reg['single']; ?>"/></td>
  </tr>
  <tr>
  <th>Doble:</th>
  <td><input type="text"  name="dob"  size="30" value="<?php echo $reg['doble']; ?>"/></td>
  </tr>
  <tr>
  <th>Triple</th>
  <td><input type="text"  name="tri"  size="30"value="<?php echo $reg['triple']; ?>"class="valores"/></td>
  </tr>
  <tr>
  <th>Cuadruple:</th>
  <td><input type="text"  name="cua" size="30" value="<?php echo $reg['cuadr']; ?>" class="valores"/></td>
  </tr>
  <tr>
  <th>Depto 2p:</th>
  <td><input type="text"  name="dp2" size="30" value="<?php echo $reg['dpto2']; ?>"class="valores"/></td>
  </tr>
  <tr>
  <th>Depto 3p:</th>
  <td><input type="text"  name="dp3"  size="30"value="<?php echo $reg['dpto3']; ?>"class="valores"/></td>
  </tr>
  <tr>
  <th>Dpto 4p:</th>
  <td><input type="text"  name="dp4" size="30" value="<?php echo $reg['dpto4']; ?>"class="valores"/></td>
  </tr>
  <tr>
  <th>Dpto 5p::</th>
  <td><input type="text"  name="dp5" size="30" value="<?php echo $reg['dpto5']; ?>"class="valores"/></td>
  </tr>
  <tr>
  <th>Dpto 6p::</th>
  <td><input type="text"  name="dp6" size="30" value="<?php echo $reg['dpto6']; ?>"class="valores"/></td>
  </tr>
  <tr>
  <th>Dpto 7p::</th>
  <td><input type="text"  name="dp7" size="30" value="<?php echo $reg['dpto7']; ?>"class="valores"/></td>
  </tr>
  <tr>
  <th>Dpto 8p::</th>
  <td><input type="text"  name="dp8" size="30" value="<?php echo $reg['dpto8']; ?>"class="valores"/></td>
  </tr>
  <tr>
  <th>Dpto 9p::</th>
  <td><input type="text"  name="dp9" size="30" value="<?php echo $reg['dpto9']; ?>"class="valores"/></td>
  </tr>
  <tr>
  <th>Suite:</th>
  <td><input type="text"  name="sui" size="30" value="<?php echo $reg['suite']; ?>"class="valores"/></td>
  </tr>
  
  <td></td>
  <td><input type="submit" value="Confirmar"></td>
  </tr>