al ejecutar la funcion, me sale esto : osea me copia de nuevo la misma factura
pero al poner mi funcion, me sale bien, pero me copia nuevamente la factura debajo de la que ya tengo , que sera, ayudame plz
Codigo html:
</tr><?php
include("conexion.php");
$query="SELECT *FROM tabla_imagen";
$resultado=$conexion->query($query);
?>
<tr>
<td><input name="codigo1" type="text" size="10" onchange=""></td>
<td><select name="descripcion1" id="descripcion1">
<option value="">Seleccione un producto</option>
<?php while($row= $resultado->fetch_assoc()){?>
<option value="<?php echo $row['nombre'];?>"><?php echo $row['nombre'];?></option><?php
}
?></select>
<input type="button" onclick="enviar();">
<?php
$d1=$_POST["descripcion1"];
echo $d1;
?>
</td>
<td><input name="cantidad1" id="cantidad1" type="number" onkeyup="sumar();total();" size="5"></td>
<td><input name="precio_unitario1" id="precio_unitario1" onkeyup="sumar();total();" type="text" size="15"></td>
<td><input name="precio_total1" id="precio_total1" value="0" type="text" onkeyup="sumar();total();" size="15"></td>