please help me with this error i could not find the solution. here's the code :
public function store_image($id) {
    $db = connection();
    $if ($db->connect_errno == 0) {
        $sql = "SELECT * from car where id='$id'";
        $res = $db->query($sql);
        while ($row = $db->fetch_assoc($res)) {
            $pic = $row['pic'];
        }
        header("content_type: image/jpg");
    }
}
the error says "Parse error: syntax error, unexpected ';'" on this line :
$sql = "SELECT * from car where id='$id'";
thanks in advance
 
    