Código PHP:
if($_GET['opcion']=="calcular_totales")
{
/*costo inicial*/
$costoini=$_GET['costo1'];
/*flete opcional*/
$fleteop=$_GET['flete1'];
/*porcentaje de venta*/
$pdvtaing=$_GET['pdvta'];
/*calculando sumas*/
$totaldol= ($costoini * ($pdvtaing/100))+$fleteop;
$totalsoles= $totaldol * $_SESSION['tasa']['cambio'];
echo "<table width='100%' border='1'>
<tr><td align='right'><b>Precio Vta. US$:<b/></td><td align='left'>";?><input type='text' class='form' size='20' name='pv' maxlength='11' value='<?=$totaldol?>' readonly='yes'></input><? echo"</td><td align='right'><b>Precio Vta. S/.:</b></td><td align='left'>";?><input type='text' class='form' size='20' name='pvs' maxlength='11' value='<?=$totalsoles?>' readonly='yes'></input><? echo"</td></tr></table>";
}