gpt4 book ai didi

javascript - PHP - 未检测到 isset($_POST ['rejectSeed' ])

转载 作者:行者123 更新时间:2023-12-03 04:52:35 25 4
gpt4 key购买 nike

不执行此代码。我有一个模式,其中有一个提交按钮,每次我必须单击提交按钮时,都没有任何操作或任何将其插入数据库的操作。我在同一个文件中有相同的代码,具有相同的功能,但另一个有效。所以数据库插入不是问题。

    //REJECTED PROJECT & CHECKING FOR REASON 
if(isset($_POST['rejectSeed'])){
echo "HUY";
$query3="UPDATE projects
SET project_status = '7', reason = '".$_POST['reasonSeed']."'
WHERE id =".$idProj."";

retrieveTable($query3);
header('Location: listprojectsprojectproposal.php');
}

enter image description here

echo "  
<div class='modal fade' id='modalRejectSeed' role='dialog'>
<div class='modal-dialog modal-lg'>
<div class='modal-content'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal'>&times;</button>
<h4 class='modal-title'>Reject ".$strings["project"].": ".$projectDetail->pro_name[0]."</h4>
</div>
<div class='modal-body'>
<h5>Please state the reason why Seed Company rejected the project ".$projectDetail->pro_name[0].". (eg. Insufficient)</h5>

<div class='input-group'>
<span class='input-group-addon' id='basic-addon1' style='width:500px;'>Reason for Rejection:</span>
<input type='text' id='reasonSeed' name='reasonSeed' class='form-control' style='width:500px;' placeholder='' aria-describedby='basic-addon1'>
</div>

</div>
<div class='modal-footer'>
<input type='submit' id='rejectSeed' class='btn btn-primary' name='rejectSeed'>
</div>
</div>
</div>
</div>

";

最佳答案

您必须在模型中添加表单标签

<form action="" method="post">
<div class='modal fade' id='modalRejectSeed' role='dialog'>
<div class='modal-dialog modal-lg'>
<div class='modal-content'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal'>&times;</button>
<h4 class='modal-title'>Reject ".$strings["project"].": ".$projectDetail->pro_name[0]."</h4>
</div>
<div class='modal-body'>
<h5>Please state the reason why Seed Company rejected the project ".$projectDetail->pro_name[0].". (eg. Insufficient)</h5>

<div class='input-group'>
<span class='input-group-addon' id='basic-addon1' style='width:500px;'>Reason for Rejection:</span>
<input type='text' id='reasonSeed' name='reasonSeed' class='form-control' style='width:500px;' placeholder='' aria-describedby='basic-addon1'>
</div>

</div>
<div class='modal-footer'>
<input type='submit' id='rejectSeed' class='btn btn-primary' name='rejectSeed'>
</div>
</div>
</div>
</div>
</form>

关于javascript - PHP - 未检测到 isset($_POST ['rejectSeed' ]),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42591542/

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