我的PHP代码似乎还不错,但会产生错误。我已经注意到:未定义变量:C:\ xampp2 \ htdocs \ datamanager1.php在第137行上的showhaddress
注意:未定义的变量:C:\ xampp2 \ htdocs \ datamanager1.php中的showppmail行138 为什么会这样呢?这是我的代码:
$stmt3 = mysqli_stmt_init($connect);
$query4 = "
SELECT haddress FROM tabela
WHERE password = ?
";
if(!mysqli_stmt_prepare($stmt3, $query4)){
echo "Failed to authenticate";
} else {
mysqli_stmt_bind_param($stmt3, "s", $_SESSION['password']);
mysqli_stmt_execute($stmt3);
$result = mysqli_stmt_get_result($stmt3); }
while($row2 = mysqli_fetch_object($result)){
$showhaddress = $row2->haddress;
}
$stmt4 = mysqli_stmt_init($connect);
$query5 = "
SELECT ppname FROM tabela
WHERE password = ?
";
if(!mysqli_stmt_prepare($stmt4, $query5)){
echo "Failed to authenticate";
} else {
mysqli_stmt_bind_param($stmt4, "s", $_SESSION['password']);
mysqli_stmt_execute($stmt4);
$result = mysqli_stmt_get_result($stmt4); }
while($row3 = mysqli_fetch_object($result)){
$showppmail = $row3->ppname;
}
$showhaddress = decrypt($showhaddress); // here is the error
$showppmail = decrypt($showppmail); //here is the error