title: Creating a delete php form
body: <p>I am having trouble trying to create a delete form in PHP to delete data using the ID given to guests. I am a newbie at this kind of stuff. </p>
  
  <p>Here is the error:</p>
  
  <pre><code>Error: DELETE FROM MyGuests WHERE id= LIMIT 1
  You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 1' at line 1
  </code></pre>
  
  <p>Here is my delete.php:</p>
  
  <pre><code>&lt;?php
  
  include_once('mysql.php');
  
  $ins= "DELETE FROM MyGuests WHERE id=$id LIMIT 1";
  
  if ($conn-&gt;query($ins) === TRUE) {
      echo "Record deleted successfully";
  } else {
      echo "Error: " . $ins . "&lt;br&gt;" . $conn-&gt;error;
  }
  
  ?&gt;
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;a href='index.php'&gt;Home&lt;/a&gt;&lt;br&gt;
  
  &lt;h2&gt;Delete User&lt;/h2&gt;
  
  &lt;form action="/delete.php" method="post"&gt;
    Guest ID:&lt;br&gt;
    &lt;input type="text" name="id" &gt;
    &lt;br&gt;&lt;br&gt;
    &lt;input type="submit" value="Submit"&gt;
  &lt;/form&gt; 
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>