我想将隐藏数据和用户输入数据发送到另一个页面。首先,我尝试仅进行一次用户输入,然后系统可以根据需要发送数据。
<h1><strong>Please scan barcode on JIG</strong></h1>
<table>
<form action="productjit21.php" method="post" name="check2"/>
<input type="hidden" name="productnumber" value="<?php echo $productnumber; ?>">
<tr><td>JIG Barcode</td><td>:</td><td><input type="text" name="jitcode2" maxlength="50"/></td></tr>
</table>
通过上面的代码,我可以发送用户和隐藏的数据。但是,当我为用户输入添加新行时,它无法发送数据。
<h1><strong>Please scan barcode on JIG</strong></h1>
<table>
<form action="productjit21.php" method="post" name="check2"/>
<input type="hidden" name="productnumber" value="<?php echo $productnumber; ?>">
<tr><td>JIG Barcode</td><td>:</td><td><input type="text" name="jitcode1" maxlength="50"/></td></tr>
<tr><td>JIG Barcode</td><td>:</td><td><input type="text" name="jitcode2" maxlength="50"/></td></tr>
</table>
我没有创建提交按钮,因为我们要使用条形码扫描仪。我认为提交按钮不是问题,因为当我仅创建一个用户输入时,系统可以在没有提交按钮的情况下运行。
与其立即关闭form标签,不如尝试将输入包装在form标签中,就像这样
<form action="productjit21.php" method="post" name="check2">
<input type="hidden" name="productnumber" value="<?php echo $productnumber; ?>">
<tr><td>JIG Barcode</td><td>:</td><td><input type="text" name="jitcode1" maxlength="50"/></td></tr>
<tr><td>JIG Barcode</td><td>:</td><td><input type="text" name="jitcode2" maxlength="50"/></td></tr>
</form>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句