title: Opposite of MySQL Insert command
body: <p>What is the opposite of the MySQL <code>INSERT</code> Command? </p>
  
  <p>I want to know how to delete users from a table without admin. I Googled everywhere but couldn't find it at all.</p>
  
  <p>Here is my PHP file:</p>
  
  <pre><code>&lt;?php
  $username = $_POST["username"];
  $password = $_POST["password"];
  $passcheck = $_POST["passcheck"];
  $email = $_POST["email"];
  if ( $username &amp;&amp; $password &amp;&amp; $passcheck &amp;&amp; $email ) {
  } else
      echo "Please enter all fields";
  ?&gt;
  ...
  &lt;form action="register.php" method="post"&gt;
      &lt;input type="text" name="username"&gt;&lt;br&gt;
      &lt;input type="password" name="password"&gt;&lt;br&gt;
      &lt;input type="password" name="passcheck"&gt;&lt;br&gt;
      &lt;input type="text" name="email"&gt;&lt;br&gt;
      &lt;input type="submit" value="Register"&gt;
  &lt;/form&gt;
  &lt;?php
  $username = $_POST["username"];
  $password = $_POST["password"];
  $passcheck = $_POST["passcheck"];
  $email = $_POST["email"];
  if ( $username &amp;&amp; $password &amp;&amp; $passcheck &amp;&amp; $email ) {
      $connect = mysql_connect( "localhost", "root", "root" ) or die("Couldn't connect!");
      mysql_select_db("login") or die("Couldn't find database!");
      $query = mysql_query( "SELECT * FROM users WHERE username='$username'" );
      $numrows = mysql_num_rows( $query );
          if ( $numrows != 0 ) {
          echo "Username taken";
      } else
          if ( $password == $passcheck ) {
              mysql_query("INSERT INTO users (username, password, email)
                  VALUES ('$username','$password','$email')");
          } else
              echo "Passwords don't match";
  } else
      echo "Please enter all fields";
  ?&gt;
  </code></pre>