Php 链接到另一个页面后,查询返回null

Php 链接到另一个页面后,查询返回null,php,mysqli,null,Php,Mysqli,Null,我有这个查询来选择一个表并用一些记录填充它,但是无论我做什么,它都会一直返回null 我通过此a href访问该页面: <input type=button onClick="parent.location='http://intrasise.uprm.edu/registro4h/login/socios/socExist/modificar/modificarSocio.php?nombreEdit=<?php echo $row["nombre"] ?>&apel

我有这个查询来选择一个表并用一些记录填充它,但是无论我做什么,它都会一直返回null

我通过此a href访问该页面:

<input type=button onClick="parent.location='http://intrasise.uprm.edu/registro4h/login/socios/socExist/modificar/modificarSocio.php?nombreEdit=<?php echo $row["nombre"] ?>&apellidoEdit=<?php echo $row["apellido"] ?>&idEdit=<?php echo $row["id"]?>

它总是返回null。我知道这是一个php问题,因为查询在phpmyadmin中工作。如果你需要更多的信息,请告诉我,我一辈子都不能弄清楚。

如果你真的在寻找潜在的错误,结果可能会告诉你你做错了什么

$sql = "SELECT * FROM socios WHERE id = '".$_GET["idEdit"]."'";

$result = $conn->query($sql);
if ( ! $result ) {
    echo $conn->error;
}

添加了if位代码,不返回任何错误。done var_dump到结果的$row变量、$conn变量和$sql变量,一切看起来都正常,就像我在无数其他查询中所做的那样
$sql = "SELECT * FROM socios WHERE id = '".$_GET["idEdit"]."'";

$result = $conn->query($sql);
if ( ! $result ) {
    echo $conn->error;
}