Mi duda es la siguiente: tengo este script
Código PHP:
<script>
var template_id = 169833869114;
var user_message_prompt = "Comenta algo sobre tu precio";
// El texto de muestra que saldrá a la hora de publicar.
var user_message = {value: ""};
// La información que introducimos en la plantilla, por ejemplo imágenes y textos fijos que acompañarán nuestro mensaje
var template_data={"app":"<a href='apps.facebook com/galletasholandesas'>Galleta de la fotuna holandesa</a>", "resp":"precio", "images":[{"src":"granplan.netne net/oro.jpg", "href":"apps.facebook com/precioenoro/"}]}
var body_general="<br /><br /><b><?
$accion =
$kg = $_POST["kg"];
$gr = $_POST["gr"];
$m = "U$D";
$suma = ($gr + $kg);
$divi = ($suma / 1000);
$precio = ($divi * 33192);
echo "Si fueras de oro puro valdrias <b>$m ".number_format($precio ,2 , "," ,".")."</b>";""
?></b>";
var continuation = function() {};
Facebook.showFeedDialog( template_id, template_data, body_general, '', continuation, user_message_prompt, user_message );
</script>
Código HTML:
<form action='?action=accion' method='post'> <select name='kg' id='kg'> <option value='20000'>20 Kg. </option> <option value='21000'>21 Kg. </option> <option value='22000'>22 Kg. </option> <option value='23000'>23 Kg. </option> <option value='24000'>24 Kg. </option> <option value='25000'>25 Kg. </option> <option value='26000'>26 Kg. </option> <option value='27000'>27 Kg. </option> <option value='28000'>28 Kg. </option> <option value='29000'>29 Kg. </option> <option value='30000'>30 Kg. </option> <option value='31000'>31 Kg. </option> <option value='32000'>32 Kg. </option> <option value='33000'>33 Kg. </option> <option value='34000'>34 Kg. </option> <option value='35000'>35 Kg. </option> <option value='36000'>36 Kg. </option> <option value='37000'>37 Kg. </option> <option value='38000'>38 Kg. </option> <option value='39000'>39 Kg. </option> <option value='40000'>40 Kg. </option> <option value='41000'>41 Kg. </option> <option value='42000'>42 Kg. </option> <option value='43000'>43 Kg. </option> <option value='44000'>44 Kg. </option> <option value='45000'>45 Kg. </option> <option value='46000'>46 Kg. </option> <option value='47000'>47 Kg. </option> <option value='48000'>48 Kg. </option> <option value='49000'>49 Kg. </option> <option value='50000'>50 Kg. </option> <option value='51000'>51 Kg. </option> <option value='52000'>52 Kg. </option> <option value='53000'>53 Kg. </option> <option value='54000'>54 Kg. </option> <option value='55000'>45 Kg. </option> <option value='56000'>56 Kg. </option> <option value='57000'>57 Kg. </option> <option value='58000'>58 Kg. </option> <option value='59000'>59 Kg. </option> <option value='60000'>60 Kg. </option> <option value='61000'>61 Kg. </option> <option value='62000'>62 Kg. </option> <option value='63000'>63 Kg. </option> <option value='64000'>64 Kg. </option> <option value='65000'>65 Kg. </option> <option value='66000'>66 Kg. </option> <option value='67000'>67 Kg. </option> <option value='68000'>68 Kg. </option> <option value='69000'>69 Kg. </option> <option value='70000'>70 Kg. </option> <option value='71000'>71 Kg. </option> <option value='72000'>72 Kg. </option> <option value='73000'>73 Kg. </option> <option value='74000'>74 Kg. </option> <option value='75000'>75 Kg. </option> <option value='76000'>76 Kg. </option> <option value='77000'>77 Kg. </option> <option value='78000'>78 Kg. </option> <option value='79000'>79 Kg. </option> <option value='80000'>80 Kg. </option> <option value='81000'>81 Kg. </option> <option value='82000'>82 Kg. </option> <option value='83000'>83 Kg. </option> <option value='84000'>84 Kg. </option> <option value='85000'>85 Kg. </option> <option value='86000'>86 Kg. </option> <option value='87000'>87 Kg. </option> <option value='88000'>88 Kg. </option> <option value='89000'>89 Kg. </option> <option value='90000'>90 Kg. </option> <option value='91000'>91 Kg. </option> <option value='92000'>92 Kg. </option> <option value='93000'>93 Kg. </option> <option value='94000'>94 Kg. </option> <option value='95000'>95 Kg. </option> <option value='96000'>96 Kg. </option> <option value='97000'>97 Kg. </option> <option value='98000'>98 Kg. </option> <option value='99000'>99 Kg. </option> <option value='100000'>100 Kg. </option> </select> <select name='gr' id='gr'> <option value='00'> 00 gr. </option> <option value='100'>100 gr. </option> <option value='200'>200 gr. </option> <option value='300'>300 gr. </option> <option value='400'>400 gr. </option> <option value='500'>500 gr. </option> <option value='600'>600 gr. </option> <option value='700'>700 gr. </option> <option value='800'>800 gr. </option> <option value='900'>900 gr. </option> </select> <input type='submit' /> </form>
Código PHP:
$accion =
$kg = $_POST["kg"];
$gr = $_POST["gr"];
$m = "U$D";
$suma = ($gr + $kg);
$divi = ($suma / 1000);
$precio = ($divi * 33192);
echo "Si fueras de oro puro valdrias <b>$m ".number_format($precio ,2 , "," ,".")."</b>";