title: What does this do in this code $id = $_GET['id'];?
body: <p>I'm trying to learn PHP and I've started with a simple <a href="https://en.wikipedia.org/wiki/Create,_read,_update_and_delete" rel="nofollow noreferrer">CRUD</a> project. I've basically downloaded some source code and I'm just trying to work through it. When I got to the delete part of the CRUD project I came across this code:</p>
  <pre><code>include 'connect.php';
  $id = $_GET['id']; // What does this line do?
  $table = 'book';
  $query = &quot;DELETE FROM $table WHERE id_book=$id&quot;;
  $result = mysqli_query($connect, $query) or die(mysqli_error($connect));
  header('location: index.php');
  </code></pre>
  <p>I'm really confused by this line:</p>
  <pre><code>$id = $_GET['id'];
  </code></pre>
  <p>When I did some searching on Google the only thing I found was a short description from some similar code that said 'getting id from URL'. This made no sense to me. What does this line actually doe and what gets stored in the <em>$id</em> variable?</p>