gpt4 book ai didi

php - 从另一个页面获取ID值

转载 作者:行者123 更新时间:2023-11-29 16:34:35 26 4
gpt4 key购买 nike

首先,我使用下面的代码显示包含客户 ID 的表报价中的数据,例如名称、报价 ID 和用户 ID 等,我想根据以下值更新表报价并更新表 Corders 中的 wpids 值表报价中的宽度。预先感谢那些愿意提供帮助的人

updatequo.php

<?php 
$qid =$_GET["qid"];
$query = mysqli_query ($conn, "SELECT * FROM quotation where qid = '$qid';");
$result = mysqli_fetch_array($query);
?>
<form action='updatequo1.php?qid=<?php echo $qid;?>' method='post'>
<table align='center' width='45%' border='0' cellpadding='0' cellspacing='0'>

<tr>
<td align='left' width='50%'>Quotation ID<td><input class='Minput' type ='text' name='qid'value='<?php echo $result["qid"];?>' disabled ></td>
</tr>
<tr>
<td align='left' width='30%'>User ID<td><input class='Minput' type ='text' name='uid' value='<?php echo $result["uid"];?>' disabled ></td>
</tr>

但是当我声明 $uid = $_POST['uid'];在 updatequo1.php 中,但它说

Notice: Undefined index: uid

在 updatequo1.php 中,我想更新 wpid 的值并根据 wid 值更改它

 $result=mysqli_query ($conn, " UPDATE corders set wpids = '$wid' where customerid = '$uid';");

最佳答案

您的输入字段已禁用,请将其替换为只读。禁用字段数据不能通过post或get方式发送。

关于php - 从另一个页面获取ID值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53694363/

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