我的主要目标是加载价格(蒙托)时,产品和付款方式的选择(科布罗准则)。这是通过使用一个查询,我找不到如何把产品和付款方式变量进行查询的最终价格。
<label>Producto</label>
<select name="id_producto" class="input_form" id="idCategoriaProducto">
<option value="" selected="selected">Seleccione...</option>
<?php
$q = mysql_query("SELECT id AS idProducto, titulo AS tituloProducto
FROM productos WHERE operando = 1
ORDER BY CAST(SUBSTRING_INDEX(titulo, '.', 1) AS UNSIGNED) ASC,
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(titulo, '.', -2), '.', 1) AS UNSIGNED) ASC,
CAST(SUBSTRING_INDEX(titulo, '.', -1) AS UNSIGNED) ASC");
while($r = mysql_fetch_array($q)){
extract($r);
?>
<option value="<?= $idProducto; ?>"
<?php
if($id_producto == $idProducto){
echo"selected='selected'";
} ?>
><?= $tituloProducto ?>
</option>
<?php
}
?>
</select>
<label>Criterio de Cobro</label>
<select name="tipo_cobro" class="input_form" required="required">
<option value="0" <?php if($tipo_cobro == "0"){echo"selected='selected'";} ?>>Seleccione...</option>
<option value="1" <?php if($tipo_cobro == "1"){echo"selected='selected'";} ?>>Fijo</option>
<option value="2" <?php if($tipo_cobro == "2"){echo"selected='selected'";} ?>>Por Hora</option>
<option value="3" <?php if($tipo_cobro == "3"){echo"selected='selected'";} ?>>Otro</option>
</select>
<div class="clear10"></div>
<label>Monto</label>
<input type="text" name="monto" class="input_form" value="<?= $monto; ?>" >
<div class="clear10"></div>
暂无答案!
目前还没有任何答案,快来回答吧!