Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8959001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:20:49+00:00 2026-06-15T15:20:49+00:00

What is the opposite of the MySQL INSERT Command? I want to know how

  • 0

What is the opposite of the MySQL INSERT Command?

I want to know how to delete users from a table without admin. I Googled everywhere but couldn’t find it at all.

Here is my PHP file:

<?php
$username = $_POST["username"];
$password = $_POST["password"];
$passcheck = $_POST["passcheck"];
$email = $_POST["email"];
if ( $username && $password && $passcheck && $email ) {
} else
    echo "Please enter all fields";
?>
...
<form action="register.php" method="post">
    <input type="text" name="username"><br>
    <input type="password" name="password"><br>
    <input type="password" name="passcheck"><br>
    <input type="text" name="email"><br>
    <input type="submit" value="Register">
</form>
<?php
$username = $_POST["username"];
$password = $_POST["password"];
$passcheck = $_POST["passcheck"];
$email = $_POST["email"];
if ( $username && $password && $passcheck && $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";
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:20:51+00:00Added an answer on June 15, 2026 at 3:20 pm

    The MySQL Delete statement is:

    DELETE FROM table_name WHERE some_column = some_value;

    Take a look here: http://www.w3schools.com/php/php_mysql_delete.asp

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an opposite but equivalent UNION function for mysql? I know it's possible
I am joining tables in mysql but I have one table that holds dates
I found the opposite here , but I need to frequently change from auto-property
Can anyone show me a query in MySQL that would delete rows from all
I have a simple table (MySQL) set up for relationships between two users. [User1Id]
Seems I want to do the opposite of what most people ask for when
How do I do the opposite of this: while((*i2s) & (1<<19)) usleep(10); I want
There are a lot of questions on exactly opposite on what I want to
I have a MySQL database on my server and I'd like a certain table
This question is the opposite of Collect several input fields and insert into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.