I'm a beginner in Jquery/PHP. I'm trying to use **.load()** to get some data from the database by specific ID in the URL, but i can't get it to work.

I'll talk about the problem i'm facing after i post both of my codes.

Here is the **index.html** file:

```html
<!DOCTYPE html> 
<html> 
<head> 
    <title>People Info</title> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>

    <b>People Info:</b>
    <ol id="new-projects"></ol>

    <script>
    $( "#new-projects" ).load( "GetDataPeople.php" );
    </script>
</body>
</html>

```

And here is my **GetDataPeople.php** file:

```html
<?php
error_reporting(E_ALL); 
ini_set('display_errors', 1);

$servername = "localhost";
$username = "user";
$password = "pass";
$db_name = "people";

// Create connection
$conn = new mysqli($servername, $username, $password, $db_name);

// Check connection
if ($conn->connect_error){
die("Connection failed: " . $conn->connect_error);
}

$id = $_GET['id'];
$query = "SELECT * FROM people WHERE id='" . $id . "'";
$result = mysqli_query($conn,$query);

while($row = mysqli_fetch_array($result)) {
    echo "<br><br>";
    echo $row['id'];
    echo $row['FirstName'];
    echo $row['LastName'];
    echo $row['Phone'];
}
?>

```

The **GetDataPeople.php** itself works fine, i mean when i try to type "**GetDataPeople.php?id=2**" in the URL, i get the data that has the ID number 2, which is exactly what i want to get out of this.

But when i try to use "**index.html?id=2**" it says that there is something wrong with the query (I think because it didn't use the ID in the URL. I tried to use a simple query like : SELECT \* FROM people and it worked fine. So yah i think what caused the error is because it didn't read the URL).

So i'd really like to know how to fix it.

Thank you in advance.