如何从html5输出标签中检索数据到php变量中?

问题描述:

我的html代码中有一个输出标记,它是来自两个输入的数学计算

I have a output tag in my html code , which is a mathematical calculation from two inputs

<form oninput="duyd.value = (+tot.value)-(+paid.value);"action="createinvoice.php" method="post" name="my-form">
<output name="tot" for="subtot lasdue" id="tot" ></output>
<input type="submit" name="Submit" value="Submit">
</form>
now i was to use this output data into a php variable . For example 

    $tot = $_POST['tot'];

但是它不起作用.有什么办法吗?

But itsnt working . any solution ?

得到解决方案-_-

代替输出标签,只需使用具有相同id和name的输入标签即可.还要检查

Instead of output tag , just use input tag using same id and name . also check the for part

 <input type="text" id="duyd" name="dued" for="tot paid">

代替输出标签,只需使用具有相同id和name的输入标签即可.还要检查部分

Instead of output tag , just use input tag using same id and name . also check the for part

 <input type="text" id="duyd" name="dued" for="tot paid">