<b>Notice</b>: Undefined index: Qunid in <b>D:\PHP\htdocs\webqq\index.php</b> on line <b>7</b><br />

<b>Notice</b>: Undefined index: Qunid in <b>D:\PHP\htdocs\webqq\index.php</b> on line <b>7</b><br />
<br />
<b>Notice</b>: Undefined index: Qunnid in <b>D:\PHP\htdocs\webqq\index.php</b> on line <b>8</b><br />
源代码:
<?php
header("Content-Type:text/html;charset=utf-8");

if($_SERVER['REQUEST_METHOD'] == "POST") {

$Lxid = trim($_POST["Event"]); //类型id
$Qunid = trim($_POST["Qunid"]); //群号码
$Qunnid = trim($_POST["Qunnid"]); //群内部号码(发群消息用的)
$Sender = trim($_POST["Sender"]);
$Nick = trim($_POST["Nick"]);
$Message = trim($_POST["Message"]);
$SendTime = trim($_POST["SendTime"]);
$Version = trim($_POST["Version"]);

怎么修改。。。在线等待

Undefined index: Qunid
Undefined index: Qunnid

也就是说:

$Qunid = trim($_POST["Qunid"]); //群号码
$Qunnid = trim($_POST["Qunnid"]); //群内部号码(发群消息用的)

这两句代码,$_POST["Qunid"]、$_POST["Qunnid"] 可能都没有。

你需要检查这两个变量定义了没有,以及有没有正确传递。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2019-10-25
我试的结果是href直接跳到一个页面的话$_GET['name'];会报错或者name显示不出来,
<a href='edittable1data.php?name=<?php echo $name?>'>修改</a>
但是用javascript function跳过去的话就没问题,可以正常显示出来
<a href='javascript:modify(<?php echo $name ?>)'>修改</a>
function modify (name) {
window.location ='edittable1data.php?name='+name;

}
不过我不知道为什么会这样

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网