how to use the output value in php -


i've got, html file clients can buy objects. there output line in order calculate sum of objects user buy :

<output name="sum" for="i1 i2 i3 i4 i5 i16 i17 i18 i19 i20 i21 i22 i23 i24" id=sum></output> 

is there way, then, in php function, output ? :

$somme=($_get['sum']);  

in order :

$msg .= "total = $sum"; 

thank you;

you can receive form values get/post methods as:

get

<?php   if( $_get['sum'] )   {      echo  "total =".$_get['sum'];      exit();   } ?>  <form action="<?php $_php_self ?>" method="get">  <output name="sum" for="i1 i2 i3 i4 i5 i16 i17 i18 i19 i20 i21 i22 i23 i24" id=sum></output> </form> 

post

<?php   if( $_post['sum'] )   {      echo  "total =".$_post['sum'];      exit();   } ?>  <form action="<?php $_php_self ?>" method="posr">  <output name="sum" for="i1 i2 i3 i4 i5 i16 i17 i18 i19 i20 i21 i22 i23 i24" id=sum></output> </form> 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -