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

  • Home
  • SEARCH
  • 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 8772145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:58:09+00:00 2026-06-13T17:58:09+00:00

I have a SQL delete button after every record shown on my page. I

  • 0

I have a SQL delete button after every record shown on my page. I have exactly what the button should do, but it’s not working! I even echo the $sql to make sure it’s correct and it displays the following:

DELETE * FROM recensies WHERE ID ='508a7a732ef67' AND email ='info@*****.nl'

When I look at the record in PHPmyAdmin I can see that there is a record with exactly this information, but on the other had that had to be, here is my code, I’m sure you’ll see what I mean.

<?php

// Up here I connect to my DB, no problems there..

$query  = "SELECT * FROM recensies ORDER BY timestamp DESC"; 
$result = mysql_query($query) or die(mysql_error());

if (isset($_POST['verwijderen'])) 
{

    $IDdelete = mysql_real_escape_string($_POST['ID']);
    $emaildelete = mysql_real_escape_string($_POST['email']);

    $sql = "DELETE * FROM recensies "
         . "WHERE ID ='$IDdelete' AND email ='$emaildelete'";

    mysql_query($sql);

    echo $sql;
}

while ($row = mysql_fetch_array($result))
{

?>
<form method="post">
<tr>
<td><?php echo $row['cijfer']; ?></td>
<td><input type="text" name="ID" value="<?php echo $row['ID']; ?>"></input></td>
<td><?php $newb = substr($row['beoordeling'], 0, 30); echo $newb; ?>..</td>
<td><?php echo $row['voornaam']; ?> <?php echo $row['achternaam']; ?></td>
<td><input type="text" name="email" value="<?php echo $row['email']; ?>"></td>
<td><?php $datum = date("j/n/y", strtotime($row[timestamp])); echo $datum; ?></td>
<td><input type="submit" value="Verwijderen" name="verwijderen"></td>
</tr>
</form>

<?php

}

?>

</table>

</div>

</div>

I just can’t find my error!

  • 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-13T17:58:10+00:00Added an answer on June 13, 2026 at 5:58 pm

    I think you need to remove the * from the delete statement, so like this:

    DELETE FROM recensies WHERE ID ='508a7a732ef67' AND email ='info@*****.nl'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a delete button in my gridview, but I want this button not
I have configured the maven-sql plugin to execute the insert and delete scripts for
I have sql database stored on a shared netwrok drive , after set of
I have a page that contains a Gridview showing a record from a db
I have a GirdView table in my application. I have a Delete link button
I am having difficulty deleting rows from my database. I have a delete button
I'm using this code to delete a row in a table, but it's not
I have a series of T-SQL DELETE FROM TABLE and INSERT statements to run.
I have a customer with many Addresses .Deleting the customer should delete all the
I m working with c#, in this i want to delete record from the

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.