如何从html5输出标签中检索数据到php变量中? [英] How to retrieve data from html5 output tag into php variable?

查看:51
本文介绍了如何从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">

这篇关于如何从html5输出标签中检索数据到php变量中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆