php – 如何在表单上使用提交按钮传递参数
发布时间:2020-12-13 22:04:41 所属栏目:PHP教程 来源:网络整理
导读:我想创建一个可以改变 PHP的mySQL中的产品数据. 我有一个自动增加和指定每个产品的关键列. 当我点击编辑产品链接时,它会传递我从每个产品获得的关键值 并链接到editPage.php $Key = $data['Key']; a href="editPage.php?Key=".$Key.""edit/a 在editPage.ph
我想创建一个可以改变
PHP的mySQL中的产品数据.
我有一个自动增加和指定每个产品的关键列. 当我点击编辑产品链接时,它会传递我从每个产品获得的关键值 并链接到editPage.php $Key = $data['Key']; <a href="editPage.php?Key=".$Key."">edit</a> 在editPage.php我从前一页获取键值,我想通过提交表单按钮将此值传递到下一页.我在操作链接中附加键值. <?$Key = $_GET["Key"];?> <form id="form2" name="form1" method="post" action="editWeb.php?Key=".$Key." "> 它不起作用,我可以用其他方式传递Key值.如果您想了解更多信息,请告诉我 解决方法
你需要回应价值.
<form id="form2" name="form1" method="post" action="editWeb.php?Key=<? echo $Key ?>"/> 您还可以使用隐藏的输入: <form id="form2" name="form1" method="post" action="editWeb.php"/> <input type="hidden" name="Key" value="<? echo $Key ?>" /> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |