title: getting id from url inside sql query
body: <p>I have an sql query to fetch data from database in php. I am using the limit to limit data. I need to limit data according to the id in the url. </p>
  
  <p>How can I call the id in the sql query. I have tried the following but it's showing an error:</p>
  
  <pre><code>$response=mysqli_query($con,"select * from prometric ORDER BY RAND() LIMIT echo $_GET['id']; ");
  </code></pre>
  
  <p>and the error is </p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\xampp\htdocs\nurse\prometricajax.php on line 14</p>
  </blockquote>