发件人页面
$.ajax({
type : "POST", // type of method
url : "1.php", // your page
data : { PID : $PID, PQ : $ProductNeed }, // passing the values
success: function(res) { }
});
<小时/>
接收者页面
if (isset($_POST['PID'])) {
$result = mysqli_query($conn, "call herestoredProcedure('".$_SESSION['USERid'])."','".$_POST['PQ']."','".$_POST['PID']."')";
mysqli_close($conn);
}
_POST 未接收 PID、PQ 索引器的数据。请帮我解决一下。
最佳答案
您的 URL 参数有拼写错误。它不是“1.php”,而是“1.php”。另外我不建议你只用数字来命名 php 文件。
关于javascript - 使用未收到的数据将数据 POST 到 PHP 的另一个页面,以便使用 Ajax 进行处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53797331/