我具有以下格式,我希望能够设置发票号,该发票号将成为我将订单导出到csv的php文件中使用的起点:
<form action="QB_EXPORT.php" method="post">
<div class="add-to-cart-quantity">
<label class="quantity-label" >invoice starting number</label><br/>
<input type="number" min="1" value="25200" name="invoice_number" style="width:225px; height:21px; text-align:center; border:2px solid rgb(224, 224, 224); padding:10px; ">
</div>
<br/><br/>
<div id="cartbutt">
<div class="shop-card">
<button name="submit" class="btn addToCartButton" style="float:none;">EXPORT INVOICES<span class="bg"></span></button>
</div>
</div>
</form>
我想使用输入的数字“ invoice_number”中的值作为我的php文件QB_EXPORT.php中的起始值
是否可以在php文件中使用它?我能想到的唯一方法是为该值创建一个数据库条目,然后将其从QB_EXPORT.php文件中的数据库中拉出,但我只是想知道是否有一种避免必须将其存储在数据库中的方法。我要输入它,我意识到这并不难。
答案 0 :(得分:1)
此问题已在评论中解决,但出于完整性考虑,我认为我应该做出正式答复,以防其他人发现此问题而无法阅读评论。
您可以选择使用$_POST
,如下所示:
$name = $_POST["invoice_number"];