你好我有一个表格,我从前一页接收参数,所以我想传递我从前一页收到的表格加参数的两个值。
这是我的代码
<?php
$remoteemployeeid = $_GET['RemoteEmployeeID']; // parameter to be pass to next page via submit button
?>
<form action="Remote Employee Transaction History_exe.php" name="TransactionForm" method="post">
<table width="1280px" border="0" cellpadding="3" style="font-family:Verdana; margin-top:30px; margin-left:28px;" align="center">
<tr>
<td height="99" colspan="2" align="left" valign="middle">
<p><font size="+3"> Remote Employee Transaction History Page</font></p>
</td>
</tr>
<tr>
<td width="32%">Remote Employee Earn Amount:</td>
<td width="68%"><input type="number" id="earnamount" name="earnamount" onChange="transaction()" ></td>
</tr>
<tr>
<td>Remote Employee Tax Deduction:</td>
<td><select name="taxdeduction" id="taxdeduction" onChange="transaction()"><br />
<option selected="selected">Tax Deduction</option>
<option value="2">Two Percent</option>
<option value="7">Seven Percent</option>
<option value="10">Ten Percent</option>
</select></td>
</tr>
<tr>
<td bgcolor="#CCCCCC">Remote Employee Amount Payable:</td>
<td bgcolor="#CCCCCC"><input type="number" id="amountpayable" name="amountpayable" readonly></td>
</tr>
<tr>
<td>Remote Employee Amount Paid:</td>
<td><input type="number" id="amountpaid" name="amountpaid" onChange="transaction()" ></td>
</tr>
<tr>
<td bgcolor="#CCCCCC">Remote Employee Amount Remain With Office:</td>
<td bgcolor="#CCCCCC"><input type="number" id="amountremainwithoffice" name="amountremainwithoffice" readonly ></td>
</tr>
<tr>
<td><input type="submit" value="Submit To Database"></td>
</tr>
</table>
</form>
答案 0 :(得分:0)
action =“远程员工交易历史记录_exe.php”
更改为action="Remote Employee Transaction History_exe.php?RemoteEmployeeID=<?php echo $_GET['RemoteEmployeeID']; ?>"
但请注意,这很容易搞乱,因为您只需更改浏览器地址字段中的网址即可更改RemoteEmployeeID。
更好的方法是使用php会话。