你好请帮我解决这个问题
<?PHP
if(isset($_GET["id"]))
{
$id= $_GET["id"];}
echo $id;
$user_name = "root";
$password = "";
$database = "test";
$server = "127.0.0.1";
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);
if ($db_found) {
$SQL = "SELECT location FROM core_network WHERE sub_cat= (".$id.")";
$r=mysql_query($SQL);
$i=0;
while($data=mysql_fetch_array($r))
{
$result[$i]=$data['location'];
$i++;
}
#print_r($result);
回声 $id; 打印正常,我找不到问题,请帮我解决这个问题,非常感谢