Trying to retrieve several elements by same ID from Database
<p>I have a car database which stores several cars for each individual model, I am trying to retrieve all the cars for a specific model however my code is not working, where am I going wrong?</p>

<pre><code>$ModelID = $_GET['model_id'];

$result = mysqli_query($con, "SELECT * FROM Car WHERE ModelID = $ModelID");

while($row = mysql_fetch_assoc($result))
{           
   echo $row["RegNumber"];
   echo $row["Colour"]; 
}
</code></pre>