title: Trying to create delete button to delete records in database
body: <p>I am making a school project. </p>
  
  <p>The meaning of this project is that i create a <code>login/registration form</code>,</p>
  
  <p>where i can register, login, view the record. </p>
  
  <p>But i also need to make a dropdown menu were i can see all the records (users) and below it i need to make a button and when i select a record/user and press the delete button it need to be deleted from the database. and i have no clue how i can do this.</p>
  
  <p><strong>here is my code:</strong></p>
  
  <pre><code>&lt;?php
  </code></pre>
  
  <p>include ("connectie.php");
  include ("deletecode.php");</p>
  
  <pre><code>$conn = new mysqli("localhost", "student14_admin", "lol12345","student14_jordi");
  mysqli_select_db($conn,'student14_jordi');
  
  $sql = "DELETE FROM users WHERE ID='$_GET[id]'";
  
  
  
  echo "&lt;select name='user'&gt;";
      if ($result-&gt;num_rows&gt;0) {
      while($row = $result-&gt;fetch_assoc()) {
          echo "&lt;option value=" . $row['username'] . "&gt;" . $row['username'] . "&lt;/option&gt;";
      }
      }
      echo "&lt;/select&gt;";
  
  ?&gt;
  
  
  &lt;form action=""&gt;
  &lt;a class="delete" href="delete.php?id=&lt;?php echo $row['id']; ?&gt;"&gt;Delete&lt;/a&gt;
  &lt;/form&gt;
  </code></pre>