gpt4 book ai didi

php - 通过 post 传递变量

转载 作者:行者123 更新时间:2023-11-29 22:32:38 25 4
gpt4 key购买 nike

我正在尝试创建一个记录销售的系统。我需要的是,当用户单击“提交”时,它会将商品的成本发送给数据库条目。我已经有了成本“Product_Price”的变量,但对于销售表,我需要它以“sales_price”形式发送,我尝试禁用该框,但随后它只是销售该框为空并且不起作用。

<form name="purchase" id="purchase" action="files/insert.php" method="post">
Name : <input type="text" name="sale_name" value="" />

Contact Details: <input type="text" name="sale_contact" value="" />

Address: <textarea cols="50" rows="5" name="sale_address" value=""> </textarea>

Price: <input type="text" name="sale_price" value="<?php echo $data['Product_Price'];?>" />
<input type="submit" name="purchase" /></form>

最佳答案

如果我正确理解您的问题,您只需在价格输入中使用 type="hidden" 即可。

关于php - 通过 post 传递变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29680654/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com