mysql_query无法找到数据

can anyone please tell me what is the problem of my code.
I am passing the value with http://www.mywebsite.com/site.php?id='$id'
note : this website link just example so please do not click on it ! and also mysql_connect for sure no error because it after test alrdy.

<?php   

    include_once("mysql_connect.php");
    $id = $_REQUEST['id'];

    if($id == ""){
        $error = "Missing data!";
    } else {
        $sqlCheck = mysql_query("SELECT * FROM $table WHERE id='$id' LIMIT 1");
        $sqlRow = mysql_num_rows($sqlCheck);
            if($sqlRow == 1){
                $sqlArray = mysql_fetch_assoc($sqlCheck);
                    $data1 = $sqlArray['data1'];
                    $data2 = $sqlArray['data2'];
            } else {
                $error = "Data not found!";
            }
    }   
?>

The output of this code is "Data not found" so basically it cannot found the data at all. but after I was put the actual number for id, it generate all the information. for example : mysql_query("SELECT * FROM $table WHERE id='13' LIMIT 1");

can anyone tell me why ??? thx u ^^